Changeset 61408 in webkit


Ignore:
Timestamp:
Jun 18, 2010 8:46:24 AM (14 years ago)
Author:
eric@webkit.org
Message:

2010-06-18 Sheriff Bot <webkit.review.bot@gmail.com>

Unreviewed, rolling out r61405.
http://trac.webkit.org/changeset/61405
https://bugs.webkit.org/show_bug.cgi?id=40838

broke chromium mac compile (Requested by tonyg-cr1 on
#webkit).

  • fast/js/parser-high-byte-character-expected.txt: Removed.
  • fast/js/parser-high-byte-character.html: Removed.
  • fast/js/script-tests/parser-high-byte-character.js: Removed.

2010-06-18 Sheriff Bot <webkit.review.bot@gmail.com>

Unreviewed, rolling out r61405.
http://trac.webkit.org/changeset/61405
https://bugs.webkit.org/show_bug.cgi?id=40838

broke chromium mac compile (Requested by tonyg-cr1 on
#webkit).

  • bindings/v8/ScriptSourceCode.h: (WebCore::ScriptSourceCode::ScriptSourceCode):
  • bindings/v8/V8Proxy.cpp: (WebCore::V8Proxy::compileScript): (WebCore::V8Proxy::evaluate):
  • bindings/v8/V8Proxy.h:
Location:
trunk
Files:
3 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r61406 r61408  
     12010-06-18  Sheriff Bot  <webkit.review.bot@gmail.com>
     2
     3        Unreviewed, rolling out r61405.
     4        http://trac.webkit.org/changeset/61405
     5        https://bugs.webkit.org/show_bug.cgi?id=40838
     6
     7        broke chromium mac compile (Requested by tonyg-cr1 on
     8        #webkit).
     9
     10        * fast/js/parser-high-byte-character-expected.txt: Removed.
     11        * fast/js/parser-high-byte-character.html: Removed.
     12        * fast/js/script-tests/parser-high-byte-character.js: Removed.
     13
    1142010-06-18  Zhenyao Mo  <zmo@google.com>
    215
  • trunk/WebCore/ChangeLog

    r61406 r61408  
     12010-06-18  Sheriff Bot  <webkit.review.bot@gmail.com>
     2
     3        Unreviewed, rolling out r61405.
     4        http://trac.webkit.org/changeset/61405
     5        https://bugs.webkit.org/show_bug.cgi?id=40838
     6
     7        broke chromium mac compile (Requested by tonyg-cr1 on
     8        #webkit).
     9
     10        * bindings/v8/ScriptSourceCode.h:
     11        (WebCore::ScriptSourceCode::ScriptSourceCode):
     12        * bindings/v8/V8Proxy.cpp:
     13        (WebCore::V8Proxy::compileScript):
     14        (WebCore::V8Proxy::evaluate):
     15        * bindings/v8/V8Proxy.h:
     16
    1172010-06-18  Zhenyao Mo  <zmo@google.com>
    218
  • trunk/WebCore/bindings/v8/ScriptSourceCode.h

    r61405 r61408  
    3232#define ScriptSourceCode_h
    3333
    34 #include "CachedResourceHandle.h"
    3534#include "CachedScript.h"
    3635#include "KURL.h"
     
    4342    ScriptSourceCode(const String& source, const KURL& url = KURL(), int startLine = 1)
    4443        : m_source(source)
    45         , m_cachedScript(0)
    4644        , m_url(url)
    4745        , m_startLine(startLine)
     
    5351    ScriptSourceCode(CachedScript* cs)
    5452        : m_source(cs->script())
    55         , m_cachedScript(cs)
    5653        , m_url(ParsedURLString, cs->url())
    5754        , m_startLine(1)
     
    6259
    6360    const String& source() const { return m_source; }
    64     CachedScript* cachedScript() const { return m_cachedScript.get(); }
    6561    const KURL& url() const { return m_url; }
    6662    int startLine() const { return m_startLine; }
     
    6864private:
    6965    String m_source;
    70     CachedResourceHandle<CachedScript> m_cachedScript;
    7166    KURL m_url;
    7267    int m_startLine;
  • trunk/WebCore/bindings/v8/V8Proxy.cpp

    r61405 r61408  
    3333
    3434#include "CSSMutableStyleDeclaration.h"
    35 #include "CachedMetadata.h"
    3635#include "DateExtension.h"
    3736#include "DocumentLoader.h"
     
    7170#include <wtf/Assertions.h>
    7271#include <wtf/OwnArrayPtr.h>
    73 #include <wtf/OwnPtr.h>
    7472#include <wtf/StdLibExtras.h>
    7573#include <wtf/StringExtras.h>
     
    235233}
    236234
    237 v8::Handle<v8::Script> V8Proxy::compileScript(v8::Handle<v8::String> code, const String& fileName, int baseLine, v8::ScriptData* scriptData)
     235v8::Handle<v8::Script> V8Proxy::compileScript(v8::Handle<v8::String> code, const String& fileName, int baseLine)
    238236{
    239237    const uint16_t* fileNameString = fromWebCoreString(fileName);
     
    241239    v8::Handle<v8::Integer> line = v8::Integer::New(baseLine);
    242240    v8::ScriptOrigin origin(name, line);
    243     v8::Handle<v8::Script> script = v8::Script::Compile(code, &origin, scriptData);
     241    v8::Handle<v8::Script> script = v8::Script::Compile(code, &origin);
    244242    return script;
    245243}
     
    340338}
    341339
    342 PassOwnPtr<v8::ScriptData> V8Proxy::precompileScript(v8::Handle<v8::String> code, CachedScript* cachedScript)
    343 {
    344     // A pseudo-randomly chosen ID used to store and retrieve V8 ScriptData from
    345     // the CachedScript. If the format changes, this ID should be changed too.
    346     static const unsigned dataTypeID = 0xECC13BD7;
    347 
    348     // Very small scripts are not worth the effort to preparse.
    349     static const unsigned minPreparseLength = 1024;
    350 
    351     if (!cachedScript || code->Length() < minPreparseLength)
    352         return 0;
    353 
    354     CachedMetadata* cachedMetadata = cachedScript->cachedMetadata(dataTypeID);
    355     if (cachedMetadata)
    356         return v8::ScriptData::New(cachedMetadata->data(), cachedMetadata->size());
    357 
    358     OwnPtr<v8::ScriptData> scriptData(v8::ScriptData::PreCompile(code));
    359     cachedScript->setCachedMetadata(dataTypeID, scriptData->Data(), scriptData->Length());
    360 
    361     return scriptData.release();
    362 }
    363 
    364340v8::Local<v8::Value> V8Proxy::evaluate(const ScriptSourceCode& source, Node* node)
    365341{
     
    387363        PlatformBridge::traceEventBegin("v8.compile", node, "");
    388364#endif
    389         OwnPtr<v8::ScriptData> scriptData = precompileScript(code, source.cachedScript());
    390365
    391366        // NOTE: For compatibility with WebCore, ScriptSourceCode's line starts at
    392367        // 1, whereas v8 starts at 0.
    393         v8::Handle<v8::Script> script = compileScript(code, source.url(), source.startLine() - 1, scriptData.get());
     368        v8::Handle<v8::Script> script = compileScript(code, source.url(), source.startLine() - 1);
    394369#if PLATFORM(CHROMIUM)
    395370        PlatformBridge::traceEventEnd("v8.compile", node, "");
  • trunk/WebCore/bindings/v8/V8Proxy.h

    r61405 r61408  
    5454namespace WebCore {
    5555
    56     class CachedScript;
    5756    class DOMWindow;
    5857    class Frame;
     
    287286        static v8::Handle<v8::Value> checkNewLegal(const v8::Arguments&);
    288287
    289         static v8::Handle<v8::Script> compileScript(v8::Handle<v8::String> code, const String& fileName, int baseLine, v8::ScriptData* = 0);
     288        static v8::Handle<v8::Script> compileScript(v8::Handle<v8::String> code, const String& fileName, int baseLine);
    290289
    291290        // If the exception code is different from zero, a DOM exception is
     
    343342        void resetIsolatedWorlds();
    344343
    345         PassOwnPtr<v8::ScriptData> precompileScript(v8::Handle<v8::String>, CachedScript*);
    346 
    347344        // Returns false when we're out of memory in V8.
    348345        bool setInjectedScriptContextDebugId(v8::Handle<v8::Context> targetContext);
Note: See TracChangeset for help on using the changeset viewer.