Title: [136641] trunk/Source/WebCore
Revision
136641
Author
[email protected]
Date
2012-12-04 22:20:57 -0800 (Tue, 04 Dec 2012)

Log Message

[V8] Replace String::New("symbol") with String::NewSymbol("symbol")
https://bugs.webkit.org/show_bug.cgi?id=104084

Reviewed by Adam Barth.

V8 can look up symbols faster than strings. This is a final patch for the replacement.

No tests. No change in behavior.

* bindings/v8/DateExtension.cpp:
(WebCore::DateExtension::setAllowSleep):
(WebCore::DateExtension::GetNativeFunction):
* bindings/v8/NPV8Object.cpp:
(WebCore::npIdentifierToV8Identifier):
(_NPN_Invoke):
* bindings/v8/PageScriptDebugServer.cpp:
(WebCore::PageScriptDebugServer::addListener):
* bindings/v8/ScriptController.cpp:
(WebCore::ScriptController::setContextDebugId):
* bindings/v8/ScriptDebugServer.cpp:
(WebCore::ScriptDebugServer::callDebuggerMethod):
(WebCore::ScriptDebugServer::setBreakpoint):
(WebCore::ScriptDebugServer::removeBreakpoint):
(WebCore::ScriptDebugServer::clearBreakpoints):
(WebCore::ScriptDebugServer::setBreakpointsActivated):
(WebCore::ScriptDebugServer::handleV8DebugEvent):
(WebCore::ScriptDebugServer::dispatchDidParseSource):
* bindings/v8/ScriptObject.cpp:
(WebCore::ScriptGlobalObject::set):
(WebCore::ScriptGlobalObject::get):
(WebCore::ScriptGlobalObject::remove):
* bindings/v8/V8Binding.h:
(WebCore::toV8Sequence):
* bindings/v8/V8DOMWindowShell.cpp:
(WebCore::setInjectedScriptContextDebugId):
(WebCore::V8DOMWindowShell::updateDocumentProperty):
(WebCore::V8DOMWindowShell::clearDocumentProperty):
* bindings/v8/V8NPObject.cpp:
(WebCore::npObjectPropertyEnumerator):
* bindings/v8/V8NodeFilterCondition.cpp:
(WebCore::V8NodeFilterCondition::acceptNode):
* bindings/v8/V8PerIsolateData.cpp:
(WebCore::V8PerIsolateData::constructorOfToString):
* bindings/v8/WorkerScriptController.cpp:
(WebCore::WorkerScriptController::initializeContextIfNeeded):
* bindings/v8/WorkerScriptDebugServer.cpp:
(WebCore::WorkerScriptDebugServer::addListener):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (136640 => 136641)


--- trunk/Source/WebCore/ChangeLog	2012-12-05 06:18:22 UTC (rev 136640)
+++ trunk/Source/WebCore/ChangeLog	2012-12-05 06:20:57 UTC (rev 136641)
@@ -1,3 +1,53 @@
+2012-12-04  Kentaro Hara  <[email protected]>
+
+        [V8] Replace String::New("symbol") with String::NewSymbol("symbol")
+        https://bugs.webkit.org/show_bug.cgi?id=104084
+
+        Reviewed by Adam Barth.
+
+        V8 can look up symbols faster than strings. This is a final patch for the replacement.
+
+        No tests. No change in behavior.
+
+        * bindings/v8/DateExtension.cpp:
+        (WebCore::DateExtension::setAllowSleep):
+        (WebCore::DateExtension::GetNativeFunction):
+        * bindings/v8/NPV8Object.cpp:
+        (WebCore::npIdentifierToV8Identifier):
+        (_NPN_Invoke):
+        * bindings/v8/PageScriptDebugServer.cpp:
+        (WebCore::PageScriptDebugServer::addListener):
+        * bindings/v8/ScriptController.cpp:
+        (WebCore::ScriptController::setContextDebugId):
+        * bindings/v8/ScriptDebugServer.cpp:
+        (WebCore::ScriptDebugServer::callDebuggerMethod):
+        (WebCore::ScriptDebugServer::setBreakpoint):
+        (WebCore::ScriptDebugServer::removeBreakpoint):
+        (WebCore::ScriptDebugServer::clearBreakpoints):
+        (WebCore::ScriptDebugServer::setBreakpointsActivated):
+        (WebCore::ScriptDebugServer::handleV8DebugEvent):
+        (WebCore::ScriptDebugServer::dispatchDidParseSource):
+        * bindings/v8/ScriptObject.cpp:
+        (WebCore::ScriptGlobalObject::set):
+        (WebCore::ScriptGlobalObject::get):
+        (WebCore::ScriptGlobalObject::remove):
+        * bindings/v8/V8Binding.h:
+        (WebCore::toV8Sequence):
+        * bindings/v8/V8DOMWindowShell.cpp:
+        (WebCore::setInjectedScriptContextDebugId):
+        (WebCore::V8DOMWindowShell::updateDocumentProperty):
+        (WebCore::V8DOMWindowShell::clearDocumentProperty):
+        * bindings/v8/V8NPObject.cpp:
+        (WebCore::npObjectPropertyEnumerator):
+        * bindings/v8/V8NodeFilterCondition.cpp:
+        (WebCore::V8NodeFilterCondition::acceptNode):
+        * bindings/v8/V8PerIsolateData.cpp:
+        (WebCore::V8PerIsolateData::constructorOfToString):
+        * bindings/v8/WorkerScriptController.cpp:
+        (WebCore::WorkerScriptController::initializeContextIfNeeded):
+        * bindings/v8/WorkerScriptDebugServer.cpp:
+        (WebCore::WorkerScriptDebugServer::addListener):
+
 2012-12-04  Dan Bernstein  <[email protected]>
 
         Support text-orientation: sideways-right (and sideways when it maps to sideways-right)

Modified: trunk/Source/WebCore/bindings/v8/DateExtension.cpp (136640 => 136641)


--- trunk/Source/WebCore/bindings/v8/DateExtension.cpp	2012-12-05 06:18:22 UTC (rev 136640)
+++ trunk/Source/WebCore/bindings/v8/DateExtension.cpp	2012-12-05 06:20:57 UTC (rev 136641)
@@ -76,7 +76,7 @@
 
 void DateExtension::setAllowSleep(bool allow)
 {
-    v8::Local<v8::Value> result = v8::Context::GetCurrent()->Global()->Get(v8::String::New("Date"));
+    v8::Local<v8::Value> result = v8::Context::GetCurrent()->Global()->Get(v8::String::NewSymbol("Date"));
     if (result.IsEmpty() || !result->IsObject())
         return;
 
@@ -96,9 +96,9 @@
 
 v8::Handle<v8::FunctionTemplate> DateExtension::GetNativeFunction(v8::Handle<v8::String> name)
 {
-    if (name->Equals(v8::String::New("Setup")))
+    if (name->Equals(v8::String::NewSymbol("Setup")))
         return v8::FunctionTemplate::New(Setup);
-    if (name->Equals(v8::String::New("OnSleepDetected")))
+    if (name->Equals(v8::String::NewSymbol("OnSleepDetected")))
         return v8::FunctionTemplate::New(OnSleepDetected);
 
     return v8::Handle<v8::FunctionTemplate>();

Modified: trunk/Source/WebCore/bindings/v8/NPV8Object.cpp (136640 => 136641)


--- trunk/Source/WebCore/bindings/v8/NPV8Object.cpp	2012-12-05 06:18:22 UTC (rev 136640)
+++ trunk/Source/WebCore/bindings/v8/NPV8Object.cpp	2012-12-05 06:20:57 UTC (rev 136641)
@@ -112,11 +112,11 @@
 {
     PrivateIdentifier* identifier = static_cast<PrivateIdentifier*>(name);
     if (identifier->isString)
-        return v8::String::New(static_cast<const char*>(identifier->value.string));
+        return v8::String::NewSymbol(static_cast<const char*>(identifier->value.string));
 
     char buffer[32];
     snprintf(buffer, sizeof(buffer), "%d", identifier->value.number);
-    return v8::String::New(buffer);
+    return v8::String::NewSymbol(buffer);
 }
 
 NPObject* v8ObjectToNPObject(v8::Handle<v8::Object> object)
@@ -214,7 +214,7 @@
     v8::Context::Scope scope(context);
     ExceptionCatcher exceptionCatcher;
 
-    v8::Handle<v8::Value> functionObject = v8NpObject->v8Object->Get(v8::String::New(identifier->value.string));
+    v8::Handle<v8::Value> functionObject = v8NpObject->v8Object->Get(v8::String::NewSymbol(identifier->value.string));
     if (functionObject.IsEmpty() || functionObject->IsNull()) {
         NULL_TO_NPVARIANT(*result);
         return false;

Modified: trunk/Source/WebCore/bindings/v8/PageScriptDebugServer.cpp (136640 => 136641)


--- trunk/Source/WebCore/bindings/v8/PageScriptDebugServer.cpp	2012-12-05 06:18:22 UTC (rev 136640)
+++ trunk/Source/WebCore/bindings/v8/PageScriptDebugServer.cpp	2012-12-05 06:20:57 UTC (rev 136641)
@@ -96,7 +96,7 @@
     if (!shell || !shell->isContextInitialized())
         return;
     v8::Handle<v8::Context> context = shell->context();
-    v8::Handle<v8::Function> getScriptsFunction = v8::Local<v8::Function>::Cast(m_debuggerScript.get()->Get(v8::String::New("getScripts")));
+    v8::Handle<v8::Function> getScriptsFunction = v8::Local<v8::Function>::Cast(m_debuggerScript.get()->Get(v8::String::NewSymbol("getScripts")));
     v8::Handle<v8::Value> argv[] = { context->GetEmbedderData(0) };
     v8::Handle<v8::Value> value;
     {

Modified: trunk/Source/WebCore/bindings/v8/ScriptController.cpp (136640 => 136641)


--- trunk/Source/WebCore/bindings/v8/ScriptController.cpp	2012-12-05 06:18:22 UTC (rev 136640)
+++ trunk/Source/WebCore/bindings/v8/ScriptController.cpp	2012-12-05 06:20:57 UTC (rev 136641)
@@ -713,7 +713,7 @@
     char buffer[32];
     snprintf(buffer, sizeof(buffer), "page,%d", debugId);
     buffer[31] = 0;
-    context->SetEmbedderData(0, v8::String::New(buffer));
+    context->SetEmbedderData(0, v8::String::NewSymbol(buffer));
 
     return true;
 }

Modified: trunk/Source/WebCore/bindings/v8/ScriptDebugServer.cpp (136640 => 136641)


--- trunk/Source/WebCore/bindings/v8/ScriptDebugServer.cpp	2012-12-05 06:18:22 UTC (rev 136640)
+++ trunk/Source/WebCore/bindings/v8/ScriptDebugServer.cpp	2012-12-05 06:20:57 UTC (rev 136641)
@@ -60,7 +60,7 @@
 
 v8::Local<v8::Value> ScriptDebugServer::callDebuggerMethod(const char* functionName, int argc, v8::Handle<v8::Value> argv[])
 {
-    v8::Handle<v8::Function> function = v8::Local<v8::Function>::Cast(m_debuggerScript.get()->Get(v8::String::New(functionName)));
+    v8::Handle<v8::Function> function = v8::Local<v8::Function>::Cast(m_debuggerScript.get()->Get(v8::String::NewSymbol(functionName)));
     V8RecursionScope::MicrotaskSuppression scope;
     return function->Call(m_debuggerScript.get(), argc, argv);
 }
@@ -78,17 +78,17 @@
     v8::Context::Scope contextScope(debuggerContext);
 
     v8::Local<v8::Object> args = v8::Object::New();
-    args->Set(v8::String::New("sourceID"), v8String(sourceID));
-    args->Set(v8::String::New("lineNumber"), v8Integer(scriptBreakpoint.lineNumber));
-    args->Set(v8::String::New("columnNumber"), v8Integer(scriptBreakpoint.columnNumber));
-    args->Set(v8::String::New("condition"), v8String(scriptBreakpoint.condition));
+    args->Set(v8::String::NewSymbol("sourceID"), v8String(sourceID));
+    args->Set(v8::String::NewSymbol("lineNumber"), v8Integer(scriptBreakpoint.lineNumber));
+    args->Set(v8::String::NewSymbol("columnNumber"), v8Integer(scriptBreakpoint.columnNumber));
+    args->Set(v8::String::NewSymbol("condition"), v8String(scriptBreakpoint.condition));
 
-    v8::Handle<v8::Function> setBreakpointFunction = v8::Local<v8::Function>::Cast(m_debuggerScript.get()->Get(v8::String::New("setBreakpoint")));
+    v8::Handle<v8::Function> setBreakpointFunction = v8::Local<v8::Function>::Cast(m_debuggerScript.get()->Get(v8::String::NewSymbol("setBreakpoint")));
     v8::Handle<v8::Value> breakpointId = v8::Debug::Call(setBreakpointFunction, args);
     if (!breakpointId->IsString())
         return "";
-    *actualLineNumber = args->Get(v8::String::New("lineNumber"))->Int32Value();
-    *actualColumnNumber = args->Get(v8::String::New("columnNumber"))->Int32Value();
+    *actualLineNumber = args->Get(v8::String::NewSymbol("lineNumber"))->Int32Value();
+    *actualColumnNumber = args->Get(v8::String::NewSymbol("columnNumber"))->Int32Value();
     return toWebCoreString(breakpointId->ToString());
 }
 
@@ -99,9 +99,9 @@
     v8::Context::Scope contextScope(debuggerContext);
 
     v8::Local<v8::Object> args = v8::Object::New();
-    args->Set(v8::String::New("breakpointId"), v8String(breakpointId));
+    args->Set(v8::String::NewSymbol("breakpointId"), v8String(breakpointId));
 
-    v8::Handle<v8::Function> removeBreakpointFunction = v8::Local<v8::Function>::Cast(m_debuggerScript.get()->Get(v8::String::New("removeBreakpoint")));
+    v8::Handle<v8::Function> removeBreakpointFunction = v8::Local<v8::Function>::Cast(m_debuggerScript.get()->Get(v8::String::NewSymbol("removeBreakpoint")));
     v8::Debug::Call(removeBreakpointFunction, args);
 }
 
@@ -112,7 +112,7 @@
     v8::Local<v8::Context> debuggerContext = v8::Debug::GetDebugContext();
     v8::Context::Scope contextScope(debuggerContext);
 
-    v8::Handle<v8::Function> clearBreakpoints = v8::Local<v8::Function>::Cast(m_debuggerScript.get()->Get(v8::String::New("clearBreakpoints")));
+    v8::Handle<v8::Function> clearBreakpoints = v8::Local<v8::Function>::Cast(m_debuggerScript.get()->Get(v8::String::NewSymbol("clearBreakpoints")));
     v8::Debug::Call(clearBreakpoints);
 }
 
@@ -124,8 +124,8 @@
     v8::Context::Scope contextScope(debuggerContext);
 
     v8::Local<v8::Object> args = v8::Object::New();
-    args->Set(v8::String::New("enabled"), v8::Boolean::New(activated));
-    v8::Handle<v8::Function> setBreakpointsActivated = v8::Local<v8::Function>::Cast(m_debuggerScript.get()->Get(v8::String::New("setBreakpointsActivated")));
+    args->Set(v8::String::NewSymbol("enabled"), v8::Boolean::New(activated));
+    v8::Handle<v8::Function> setBreakpointsActivated = v8::Local<v8::Function>::Cast(m_debuggerScript.get()->Get(v8::String::NewSymbol("setBreakpointsActivated")));
     v8::Debug::Call(setBreakpointsActivated, args);
 
     m_breakpointsActivated = activated;
@@ -347,7 +347,7 @@
         v8::HandleScope scope;
         if (event == v8::AfterCompile) {
             v8::Context::Scope contextScope(v8::Debug::GetDebugContext());
-            v8::Handle<v8::Function> _onAfterCompileFunction_ = v8::Local<v8::Function>::Cast(m_debuggerScript.get()->Get(v8::String::New("getAfterCompileScript")));
+            v8::Handle<v8::Function> _onAfterCompileFunction_ = v8::Local<v8::Function>::Cast(m_debuggerScript.get()->Get(v8::String::NewSymbol("getAfterCompileScript")));
             v8::Handle<v8::Value> argv[] = { eventDetails.GetEventData() };
             v8::Handle<v8::Value> value = onAfterCompileFunction->Call(m_debuggerScript.get(), 1, argv);
             ASSERT(value->IsObject());
@@ -361,7 +361,7 @@
                 if (!stackTrace->GetFrameCount())
                     return;
                 v8::Handle<v8::Object> eventData = eventDetails.GetEventData();
-                v8::Handle<v8::Value> exceptionGetterValue = eventData->Get(v8::String::New("exception"));
+                v8::Handle<v8::Value> exceptionGetterValue = eventData->Get(v8::String::NewSymbol("exception"));
                 ASSERT(!exceptionGetterValue.IsEmpty() && exceptionGetterValue->IsFunction());
                 v8::Handle<v8::Value> argv[] = { v8Undefined() };
                 V8RecursionScope::MicrotaskSuppression scope;
@@ -377,17 +377,17 @@
 
 void ScriptDebugServer::dispatchDidParseSource(ScriptDebugListener* listener, v8::Handle<v8::Object> object)
 {
-    String sourceID = toWebCoreStringWithUndefinedOrNullCheck(object->Get(v8::String::New("id")));
+    String sourceID = toWebCoreStringWithUndefinedOrNullCheck(object->Get(v8::String::NewSymbol("id")));
 
     ScriptDebugListener::Script script;
-    script.url = ""
-    script.source = toWebCoreStringWithUndefinedOrNullCheck(object->Get(v8::String::New("source")));
-    script.sourceMappingURL = toWebCoreStringWithUndefinedOrNullCheck(object->Get(v8::String::New("sourceMappingURL")));
-    script.startLine = object->Get(v8::String::New("startLine"))->ToInteger()->Value();
-    script.startColumn = object->Get(v8::String::New("startColumn"))->ToInteger()->Value();
-    script.endLine = object->Get(v8::String::New("endLine"))->ToInteger()->Value();
-    script.endColumn = object->Get(v8::String::New("endColumn"))->ToInteger()->Value();
-    script.isContentScript = object->Get(v8::String::New("isContentScript"))->ToBoolean()->Value();
+    script.url = ""
+    script.source = toWebCoreStringWithUndefinedOrNullCheck(object->Get(v8::String::NewSymbol("source")));
+    script.sourceMappingURL = toWebCoreStringWithUndefinedOrNullCheck(object->Get(v8::String::NewSymbol("sourceMappingURL")));
+    script.startLine = object->Get(v8::String::NewSymbol("startLine"))->ToInteger()->Value();
+    script.startColumn = object->Get(v8::String::NewSymbol("startColumn"))->ToInteger()->Value();
+    script.endLine = object->Get(v8::String::NewSymbol("endLine"))->ToInteger()->Value();
+    script.endColumn = object->Get(v8::String::NewSymbol("endColumn"))->ToInteger()->Value();
+    script.isContentScript = object->Get(v8::String::NewSymbol("isContentScript"))->ToBoolean()->Value();
 
     listener->didParseSource(sourceID, script);
 }

Modified: trunk/Source/WebCore/bindings/v8/ScriptObject.cpp (136640 => 136641)


--- trunk/Source/WebCore/bindings/v8/ScriptObject.cpp	2012-12-05 06:18:22 UTC (rev 136640)
+++ trunk/Source/WebCore/bindings/v8/ScriptObject.cpp	2012-12-05 06:20:57 UTC (rev 136641)
@@ -65,7 +65,7 @@
 bool ScriptGlobalObject::set(ScriptState* scriptState, const char* name, const ScriptObject& value)
 {
     ScriptScope scope(scriptState);
-    scope.global()->Set(v8::String::New(name), value.v8Value());
+    scope.global()->Set(v8::String::NewSymbol(name), value.v8Value());
     return scope.success();
 }
 
@@ -73,14 +73,14 @@
 bool ScriptGlobalObject::set(ScriptState* scriptState, const char* name, InspectorFrontendHost* value)
 {
     ScriptScope scope(scriptState);
-    scope.global()->Set(v8::String::New(name), toV8(value));
+    scope.global()->Set(v8::String::NewSymbol(name), toV8(value));
     return scope.success();
 }
 
 bool ScriptGlobalObject::set(ScriptState* scriptState, const char* name, InjectedScriptHost* value)
 {
     ScriptScope scope(scriptState);
-    scope.global()->Set(v8::String::New(name), toV8(value));
+    scope.global()->Set(v8::String::NewSymbol(name), toV8(value));
     return scope.success();
 }
 #endif
@@ -88,7 +88,7 @@
 bool ScriptGlobalObject::get(ScriptState* scriptState, const char* name, ScriptObject& value)
 {
     ScriptScope scope(scriptState);
-    v8::Local<v8::Value> v8Value = scope.global()->Get(v8::String::New(name));
+    v8::Local<v8::Value> v8Value = scope.global()->Get(v8::String::NewSymbol(name));
     if (v8Value.IsEmpty())
         return false;
 
@@ -102,7 +102,7 @@
 bool ScriptGlobalObject::remove(ScriptState* scriptState, const char* name)
 {
     ScriptScope scope(scriptState);
-    return scope.global()->Delete(v8::String::New(name));
+    return scope.global()->Delete(v8::String::NewSymbol(name));
 }
 
 } // namespace WebCore

Modified: trunk/Source/WebCore/bindings/v8/V8Binding.h (136640 => 136641)


--- trunk/Source/WebCore/bindings/v8/V8Binding.h	2012-12-05 06:18:22 UTC (rev 136640)
+++ trunk/Source/WebCore/bindings/v8/V8Binding.h	2012-12-05 06:20:57 UTC (rev 136641)
@@ -328,7 +328,7 @@
         v8::Local<v8::Value> v8Value(v8::Local<v8::Value>::New(value));
         v8::Local<v8::Object> object = v8::Local<v8::Object>::Cast(v8Value);
 
-        V8TRYCATCH(v8::Local<v8::Value>, lengthValue, object->Get(v8::String::New("length")));
+        V8TRYCATCH(v8::Local<v8::Value>, lengthValue, object->Get(v8::String::NewSymbol("length")));
 
         if (lengthValue->IsUndefined() || lengthValue->IsNull()) {
             throwTypeError();

Modified: trunk/Source/WebCore/bindings/v8/V8DOMWindowShell.cpp (136640 => 136641)


--- trunk/Source/WebCore/bindings/v8/V8DOMWindowShell.cpp	2012-12-05 06:18:22 UTC (rev 136640)
+++ trunk/Source/WebCore/bindings/v8/V8DOMWindowShell.cpp	2012-12-05 06:20:57 UTC (rev 136641)
@@ -78,7 +78,7 @@
         snprintf(buffer, sizeof(buffer), "injected");
     else
         snprintf(buffer, sizeof(buffer), "injected,%d", debugId);
-    targetContext->SetEmbedderData(0, v8::String::New(buffer));
+    targetContext->SetEmbedderData(0, v8::String::NewSymbol(buffer));
 }
 
 PassOwnPtr<V8DOMWindowShell> V8DOMWindowShell::create(Frame* frame, PassRefPtr<DOMWrapperWorld> world)
@@ -366,7 +366,7 @@
         return;
     }
     ASSERT(documentWrapper->IsObject());
-    m_context->Global()->ForceSet(v8::String::New("document"), documentWrapper, static_cast<v8::PropertyAttribute>(v8::ReadOnly | v8::DontDelete));
+    m_context->Global()->ForceSet(v8::String::NewSymbol("document"), documentWrapper, static_cast<v8::PropertyAttribute>(v8::ReadOnly | v8::DontDelete));
 
     // We also stash a reference to the document on the inner global object so that
     // DOMWindow objects we obtain from _javascript_ references are guaranteed to have
@@ -379,7 +379,7 @@
     ASSERT(!m_context.isEmpty());
     if (!m_world->isMainWorld())
         return;
-    m_context->Global()->ForceDelete(v8::String::New("document"));
+    m_context->Global()->ForceDelete(v8::String::NewSymbol("document"));
 }
 
 void V8DOMWindowShell::setSecurityToken()

Modified: trunk/Source/WebCore/bindings/v8/V8NPObject.cpp (136640 => 136641)


--- trunk/Source/WebCore/bindings/v8/V8NPObject.cpp	2012-12-05 06:18:22 UTC (rev 136640)
+++ trunk/Source/WebCore/bindings/v8/V8NPObject.cpp	2012-12-05 06:20:57 UTC (rev 136641)
@@ -354,7 +354,7 @@
             for (uint32_t i = 0; i < count; ++i) {
                 IdentifierRep* identifier = static_cast<IdentifierRep*>(identifiers[i]);
                 if (namedProperty)
-                    properties->Set(v8Integer(i, info.GetIsolate()), v8::String::New(identifier->string()));
+                    properties->Set(v8Integer(i, info.GetIsolate()), v8::String::NewSymbol(identifier->string()));
                 else
                     properties->Set(v8Integer(i, info.GetIsolate()), v8Integer(identifier->number(), info.GetIsolate()));
             }

Modified: trunk/Source/WebCore/bindings/v8/V8NodeFilterCondition.cpp (136640 => 136641)


--- trunk/Source/WebCore/bindings/v8/V8NodeFilterCondition.cpp	2012-12-05 06:18:22 UTC (rev 136640)
+++ trunk/Source/WebCore/bindings/v8/V8NodeFilterCondition.cpp	2012-12-05 06:20:57 UTC (rev 136641)
@@ -70,7 +70,7 @@
     if (m_callback->IsFunction())
         callback = v8::Handle<v8::Function>::Cast(m_callback.get());
     else {
-        v8::Local<v8::Value> value = m_callback->ToObject()->Get(v8::String::New("acceptNode"));
+        v8::Local<v8::Value> value = m_callback->ToObject()->Get(v8::String::NewSymbol("acceptNode"));
         if (!value->IsFunction()) {
             throwTypeError("NodeFilter object does not have an acceptNode function");
             return NodeFilter::FILTER_REJECT;

Modified: trunk/Source/WebCore/bindings/v8/V8PerIsolateData.cpp (136640 => 136641)


--- trunk/Source/WebCore/bindings/v8/V8PerIsolateData.cpp	2012-12-05 06:18:22 UTC (rev 136640)
+++ trunk/Source/WebCore/bindings/v8/V8PerIsolateData.cpp	2012-12-05 06:20:57 UTC (rev 136641)
@@ -145,7 +145,7 @@
     // obscure and unlikely to be a problem.
     v8::Handle<v8::Value> value = args.Callee()->Get(v8::String::NewSymbol("toString"));
     if (!value->IsFunction()) 
-        return v8::String::New("");
+        return v8::String::Empty(args.GetIsolate());
     return v8::Handle<v8::Function>::Cast(value)->Call(args.This(), 0, 0);
 }
 

Modified: trunk/Source/WebCore/bindings/v8/WorkerScriptController.cpp (136640 => 136641)


--- trunk/Source/WebCore/bindings/v8/WorkerScriptController.cpp	2012-12-05 06:18:22 UTC (rev 136640)
+++ trunk/Source/WebCore/bindings/v8/WorkerScriptController.cpp	2012-12-05 06:20:57 UTC (rev 136641)
@@ -112,7 +112,7 @@
     }
 
     // Set DebugId for the new context.
-    context->SetEmbedderData(0, v8::String::New("worker"));
+    context->SetEmbedderData(0, v8::String::NewSymbol("worker"));
 
     // Create a new JS object and use it as the prototype for the shadow global object.
     WrapperTypeInfo* contextType = &V8DedicatedWorkerContext::info;

Modified: trunk/Source/WebCore/bindings/v8/WorkerScriptDebugServer.cpp (136640 => 136641)


--- trunk/Source/WebCore/bindings/v8/WorkerScriptDebugServer.cpp	2012-12-05 06:18:22 UTC (rev 136640)
+++ trunk/Source/WebCore/bindings/v8/WorkerScriptDebugServer.cpp	2012-12-05 06:20:57 UTC (rev 136641)
@@ -65,7 +65,7 @@
     ASSERT(!m_debuggerScript.get()->IsUndefined());
     v8::Debug::SetDebugEventListener2(&WorkerScriptDebugServer::v8DebugEventCallback, v8::External::New(this));
     
-    v8::Handle<v8::Function> getScriptsFunction = v8::Local<v8::Function>::Cast(m_debuggerScript.get()->Get(v8::String::New("getWorkerScripts")));
+    v8::Handle<v8::Function> getScriptsFunction = v8::Local<v8::Function>::Cast(m_debuggerScript.get()->Get(v8::String::NewSymbol("getWorkerScripts")));
     v8::Handle<v8::Value> argv[] = { v8Undefined() };
     v8::Handle<v8::Value> value = getScriptsFunction->Call(m_debuggerScript.get(), 0, argv);
     if (value.IsEmpty())
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to