~ubuntu-branches/ubuntu/lucid/webkit/lucid-updates

« back to all changes in this revision

Viewing changes to JavaScriptCore/runtime/DateConstructor.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Gustavo Noronha Silva
  • Date: 2010-01-06 21:25:06 UTC
  • mfrom: (1.2.6 upstream) (4.3.7 sid)
  • Revision ID: james.westby@ubuntu.com-20100106212506-gd0czn4zrwf1j19l
* New upstream release
- adds basic Content-Encoding support, thanks to soup
  (Closes: #529271)
- fixes over-advertising content types as supported by
  the media player (Closes: #559420)
* debian/control:
- updated libsoup build requirement (>= 2.28.2)
* debian/libwebkit-1.0-2.symbols:
- updated with new symbols
* debian/copyright:
- updated information since 1.1.17
* Imported patch from https://bugs.webkit.org/show_bug.cgi?id=30623
- I am shipping this patch because I believe it is correct, it is the
  way to go, it fixes a race, and it needs testing.

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
#include <wtf/DateMath.h>
36
36
#include <wtf/MathExtras.h>
37
37
 
38
 
#if PLATFORM(WINCE) && !PLATFORM(QT)
 
38
#if OS(WINCE) && !PLATFORM(QT)
39
39
extern "C" time_t time(time_t* timer); // Provided by libce.
40
40
#endif
41
41
 
84
84
        else {
85
85
            JSValue primitive = args.at(0).toPrimitive(exec);
86
86
            if (primitive.isString())
87
 
                value = parseDate(exec, primitive.getString());
 
87
                value = parseDate(exec, primitive.getString(exec));
88
88
            else
89
89
                value = primitive.toNumber(exec);
90
90
        }
133
133
    tm localTM;
134
134
    getLocalTime(&localTime, &localTM);
135
135
    GregorianDateTime ts(exec, localTM);
136
 
    return jsNontrivialString(exec, formatDate(ts) + " " + formatTime(ts));
 
136
    DateConversionBuffer date;
 
137
    DateConversionBuffer time;
 
138
    formatDate(ts, date);
 
139
    formatTime(ts, time);
 
140
    return jsNontrivialString(exec, makeString(date, " ", time));
137
141
}
138
142
 
139
143
CallType DateConstructor::getCallData(CallData& callData)