[V8] Reduce usage of deprecatedV8String() and deprecatedV8Integer()
authorharaken@chromium.org <haraken@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 24 Jan 2013 00:29:59 +0000 (00:29 +0000)
committerharaken@chromium.org <haraken@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 24 Jan 2013 00:29:59 +0000 (00:29 +0000)
https://bugs.webkit.org/show_bug.cgi?id=107674

Reviewed by Adam Barth.

No tests. No change in behavior.

* bindings/v8/JavaScriptCallFrame.cpp:
(WebCore::JavaScriptCallFrame::evaluate):
* bindings/v8/NPV8Object.cpp:
(_NPN_Enumerate):
* bindings/v8/PageScriptDebugServer.cpp:
(WebCore::PageScriptDebugServer::addListener):
* bindings/v8/ScriptController.cpp:
(WebCore::ScriptController::bindToWindowObject):
(WebCore::ScriptController::disableEval):
* bindings/v8/ScriptDebugServer.cpp:
(WebCore::ScriptDebugServer::setBreakpoint):
(WebCore::ScriptDebugServer::removeBreakpoint):
(WebCore::ScriptDebugServer::setScriptSource):
(WebCore::ScriptDebugServer::ensureDebuggerScriptCompiled):
(WebCore::ScriptDebugServer::compileScript):
* bindings/v8/ScriptFunctionCall.cpp:
(WebCore::ScriptCallArgumentHandler::appendArgument):
(WebCore::ScriptFunctionCall::call):
(WebCore::ScriptFunctionCall::construct):
* bindings/v8/ScriptProfiler.cpp:
(WebCore::ScriptProfiler::start):
(WebCore::ScriptProfiler::stop):
* bindings/v8/V8DOMWindowShell.cpp:
(WebCore::V8DOMWindowShell::initializeIfNeeded):
(WebCore::V8DOMWindowShell::namedItemAdded):
(WebCore::V8DOMWindowShell::namedItemRemoved):
* bindings/v8/V8LazyEventListener.cpp:
(WebCore::V8LazyEventListener::prepareListenerObject):
* bindings/v8/V8MutationCallback.cpp:
(WebCore::V8MutationCallback::handleEvent):
* bindings/v8/WorkerScriptController.cpp:
(WebCore::WorkerScriptController::evaluate):
* bindings/v8/WorkerScriptDebugServer.cpp:
(WebCore::WorkerScriptDebugServer::addListener):
* bindings/v8/custom/V8InjectedScriptManager.cpp:
(WebCore::InjectedScriptManager::createInjectedScript):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@140611 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 files changed:
Source/WebCore/ChangeLog
Source/WebCore/bindings/v8/JavaScriptCallFrame.cpp
Source/WebCore/bindings/v8/NPV8Object.cpp
Source/WebCore/bindings/v8/PageScriptDebugServer.cpp
Source/WebCore/bindings/v8/ScriptController.cpp
Source/WebCore/bindings/v8/ScriptDebugServer.cpp
Source/WebCore/bindings/v8/ScriptFunctionCall.cpp
Source/WebCore/bindings/v8/ScriptProfiler.cpp
Source/WebCore/bindings/v8/V8DOMWindowShell.cpp
Source/WebCore/bindings/v8/V8LazyEventListener.cpp
Source/WebCore/bindings/v8/V8MutationCallback.cpp
Source/WebCore/bindings/v8/WorkerScriptController.cpp
Source/WebCore/bindings/v8/WorkerScriptDebugServer.cpp
Source/WebCore/bindings/v8/custom/V8InjectedScriptManager.cpp

index a366fd951af7b4a2b649d63861f04204d8ad90c4..53fdb0997add22b2734498bcf1135c794fcfd49b 100644 (file)
@@ -1,3 +1,49 @@
+2013-01-23  Kentaro Hara  <haraken@chromium.org>
+
+        [V8] Reduce usage of deprecatedV8String() and deprecatedV8Integer()
+        https://bugs.webkit.org/show_bug.cgi?id=107674
+
+        Reviewed by Adam Barth.
+
+        No tests. No change in behavior.
+
+        * bindings/v8/JavaScriptCallFrame.cpp:
+        (WebCore::JavaScriptCallFrame::evaluate):
+        * bindings/v8/NPV8Object.cpp:
+        (_NPN_Enumerate):
+        * bindings/v8/PageScriptDebugServer.cpp:
+        (WebCore::PageScriptDebugServer::addListener):
+        * bindings/v8/ScriptController.cpp:
+        (WebCore::ScriptController::bindToWindowObject):
+        (WebCore::ScriptController::disableEval):
+        * bindings/v8/ScriptDebugServer.cpp:
+        (WebCore::ScriptDebugServer::setBreakpoint):
+        (WebCore::ScriptDebugServer::removeBreakpoint):
+        (WebCore::ScriptDebugServer::setScriptSource):
+        (WebCore::ScriptDebugServer::ensureDebuggerScriptCompiled):
+        (WebCore::ScriptDebugServer::compileScript):
+        * bindings/v8/ScriptFunctionCall.cpp:
+        (WebCore::ScriptCallArgumentHandler::appendArgument):
+        (WebCore::ScriptFunctionCall::call):
+        (WebCore::ScriptFunctionCall::construct):
+        * bindings/v8/ScriptProfiler.cpp:
+        (WebCore::ScriptProfiler::start):
+        (WebCore::ScriptProfiler::stop):
+        * bindings/v8/V8DOMWindowShell.cpp:
+        (WebCore::V8DOMWindowShell::initializeIfNeeded):
+        (WebCore::V8DOMWindowShell::namedItemAdded):
+        (WebCore::V8DOMWindowShell::namedItemRemoved):
+        * bindings/v8/V8LazyEventListener.cpp:
+        (WebCore::V8LazyEventListener::prepareListenerObject):
+        * bindings/v8/V8MutationCallback.cpp:
+        (WebCore::V8MutationCallback::handleEvent):
+        * bindings/v8/WorkerScriptController.cpp:
+        (WebCore::WorkerScriptController::evaluate):
+        * bindings/v8/WorkerScriptDebugServer.cpp:
+        (WebCore::WorkerScriptDebugServer::addListener):
+        * bindings/v8/custom/V8InjectedScriptManager.cpp:
+        (WebCore::InjectedScriptManager::createInjectedScript):
+
 2013-01-23  Martin Robinson  <mrobinson@igalia.com>
 
         WebKit should support decoding multi-byte entities in XML content
index 31503681315b3da586522a5a943d9be7124d7e62..7711e096907f6608f0b633e24ae0da251a759364 100644 (file)
@@ -121,7 +121,7 @@ v8::Handle<v8::Value> JavaScriptCallFrame::thisObject() const
 v8::Handle<v8::Value> JavaScriptCallFrame::evaluate(const String& expression)
 {
     v8::Handle<v8::Function> evalFunction = v8::Handle<v8::Function>::Cast(m_callFrame.get()->Get(v8::String::NewSymbol("evaluate")));
-    v8::Handle<v8::Value> argv[] = { deprecatedV8String(expression) };
+    v8::Handle<v8::Value> argv[] = { v8String(expression, m_debuggerContext->GetIsolate()) };
     return evalFunction->Call(m_callFrame.get(), 1, argv);
 }
 
index 554dcaec41ef521b6241d2300756ad3cc3d41e79..2680b0d5f324b3c4e6706b533d26d1cbbdc171cb 100644 (file)
@@ -536,7 +536,7 @@ bool _NPN_Enumerate(NPP npp, NPObject* npObject, NPIdentifier** identifier, uint
         *count = props->Length();
         *identifier = static_cast<NPIdentifier*>(malloc(sizeof(NPIdentifier*) * *count));
         for (uint32_t i = 0; i < *count; ++i) {
-            v8::Local<v8::Value> name = props->Get(deprecatedV8Integer(i));
+            v8::Local<v8::Value> name = props->Get(v8Integer(i, context->GetIsolate()));
             (*identifier)[i] = getStringIdentifier(v8::Local<v8::String>::Cast(name));
         }
         return true;
index dd49149dc229a279217558ed8c4ba95a763b7e24..b195976e7c7eb649b3c60a9d1cb7e8cb6651e792 100644 (file)
@@ -108,7 +108,7 @@ void PageScriptDebugServer::addListener(ScriptDebugListener* listener, Page* pag
     ASSERT(!value->IsUndefined() && value->IsArray());
     v8::Handle<v8::Array> scriptsArray = v8::Handle<v8::Array>::Cast(value);
     for (unsigned i = 0; i < scriptsArray->Length(); ++i)
-        dispatchDidParseSource(listener, v8::Handle<v8::Object>::Cast(scriptsArray->Get(deprecatedV8Integer(i))));
+        dispatchDidParseSource(listener, v8::Handle<v8::Object>::Cast(scriptsArray->Get(v8Integer(i, context->GetIsolate()))));
 }
 
 void PageScriptDebugServer::removeListener(ScriptDebugListener* listener, Page* page)
index 654f2a283bebe015e72ebf8eb060efef97372467..5a3f60dea0de97358f7a33802fa5b30d749fd437 100644 (file)
@@ -492,7 +492,7 @@ void ScriptController::bindToWindowObject(Frame* frame, const String& key, NPObj
 
     // Attach to the global object.
     v8::Handle<v8::Object> global = v8Context->Global();
-    global->Set(deprecatedV8String(key), value);
+    global->Set(v8String(key, v8Context->GetIsolate()), value);
 }
 
 bool ScriptController::haveInterpreter() const
@@ -515,7 +515,7 @@ void ScriptController::disableEval(const String& errorMessage)
     v8::HandleScope handleScope;
     v8::Handle<v8::Context> v8Context = m_windowShell->context();
     v8Context->AllowCodeGenerationFromStrings(false);
-    v8Context->SetErrorMessageForCodeGenerationFromStrings(deprecatedV8String(errorMessage));
+    v8Context->SetErrorMessageForCodeGenerationFromStrings(v8String(errorMessage, v8Context->GetIsolate()));
 }
 
 PassScriptInstance ScriptController::createScriptInstanceForWidget(Widget* widget)
index 00381af8d316f0e763b6eb1a0e983fb4b1e661c9..203e72598bd8f7b581f38acedcef49ee81907308 100644 (file)
@@ -172,10 +172,10 @@ String ScriptDebugServer::setBreakpoint(const String& sourceID, const ScriptBrea
     v8::Context::Scope contextScope(debuggerContext);
 
     v8::Local<v8::Object> args = v8::Object::New();
-    args->Set(v8::String::NewSymbol("sourceID"), deprecatedV8String(sourceID));
-    args->Set(v8::String::NewSymbol("lineNumber"), deprecatedV8Integer(scriptBreakpoint.lineNumber));
-    args->Set(v8::String::NewSymbol("columnNumber"), deprecatedV8Integer(scriptBreakpoint.columnNumber));
-    args->Set(v8::String::NewSymbol("condition"), deprecatedV8String(scriptBreakpoint.condition));
+    args->Set(v8::String::NewSymbol("sourceID"), v8String(sourceID, debuggerContext->GetIsolate()));
+    args->Set(v8::String::NewSymbol("lineNumber"), v8Integer(scriptBreakpoint.lineNumber, debuggerContext->GetIsolate()));
+    args->Set(v8::String::NewSymbol("columnNumber"), v8Integer(scriptBreakpoint.columnNumber, debuggerContext->GetIsolate()));
+    args->Set(v8::String::NewSymbol("condition"), v8String(scriptBreakpoint.condition, debuggerContext->GetIsolate()));
 
     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);
@@ -193,7 +193,7 @@ void ScriptDebugServer::removeBreakpoint(const String& breakpointId)
     v8::Context::Scope contextScope(debuggerContext);
 
     v8::Local<v8::Object> args = v8::Object::New();
-    args->Set(v8::String::NewSymbol("breakpointId"), deprecatedV8String(breakpointId));
+    args->Set(v8::String::NewSymbol("breakpointId"), v8String(breakpointId, debuggerContext->GetIsolate()));
 
     v8::Handle<v8::Function> removeBreakpointFunction = v8::Local<v8::Function>::Cast(m_debuggerScript.get()->Get(v8::String::NewSymbol("removeBreakpoint")));
     v8::Debug::Call(removeBreakpointFunction, args);
@@ -328,10 +328,11 @@ bool ScriptDebugServer::setScriptSource(const String& sourceID, const String& ne
     v8::HandleScope scope;
 
     OwnPtr<v8::Context::Scope> contextScope;
+    v8::Handle<v8::Context> debuggerContext = v8::Debug::GetDebugContext();
     if (!isPaused())
-        contextScope = adoptPtr(new v8::Context::Scope(v8::Debug::GetDebugContext()));
+        contextScope = adoptPtr(new v8::Context::Scope(debuggerContext));
 
-    v8::Handle<v8::Value> argv[] = { deprecatedV8String(sourceID), deprecatedV8String(newContent), v8Boolean(preview) };
+    v8::Handle<v8::Value> argv[] = { v8String(sourceID, debuggerContext->GetIsolate()), v8String(newContent, debuggerContext->GetIsolate()), v8Boolean(preview) };
 
     v8::Local<v8::Value> v8result;
     {
@@ -535,7 +536,7 @@ void ScriptDebugServer::ensureDebuggerScriptCompiled()
         v8::Context::Scope contextScope(debuggerContext);
         String debuggerScriptSource(reinterpret_cast<const char*>(DebuggerScriptSource_js), sizeof(DebuggerScriptSource_js));
         V8RecursionScope::MicrotaskSuppression recursionScope;
-        m_debuggerScript.set(v8::Handle<v8::Object>::Cast(v8::Script::Compile(deprecatedV8String(debuggerScriptSource))->Run()));
+        m_debuggerScript.set(v8::Handle<v8::Object>::Cast(v8::Script::Compile(v8String(debuggerScriptSource, debuggerContext->GetIsolate()))->Run()));
     }
 }
 
@@ -570,10 +571,10 @@ void ScriptDebugServer::compileScript(ScriptState* state, const String& expressi
         return;
     v8::Context::Scope contextScope(context);
 
-    v8::Handle<v8::String> code = deprecatedV8String(expression);
+    v8::Handle<v8::String> code = v8String(expression, context->GetIsolate());
     v8::TryCatch tryCatch;
 
-    v8::ScriptOrigin origin(deprecatedV8String(sourceURL), deprecatedV8Integer(0), deprecatedV8Integer(0));
+    v8::ScriptOrigin origin(v8String(sourceURL, context->GetIsolate()), v8Integer(0, context->GetIsolate()), v8Integer(0, context->GetIsolate()));
     v8::Handle<v8::Script> script = v8::Script::New(code, &origin);
 
     if (tryCatch.HasCaught()) {
index 114908c301e4445bb165b2f085c82bc1892ba681..6fef16e0783ed4783b85b1398aaed4e1c46c91d4 100644 (file)
@@ -62,13 +62,13 @@ void ScriptCallArgumentHandler::appendArgument(const ScriptValue& argument)
 void ScriptCallArgumentHandler::appendArgument(const String& argument)
 {
     ScriptScope scope(m_scriptState);
-    m_arguments.append(deprecatedV8String(argument));
+    m_arguments.append(v8String(argument, m_scriptState->isolate()));
 }
 
 void ScriptCallArgumentHandler::appendArgument(const char* argument)
 {
     ScriptScope scope(m_scriptState);
-    m_arguments.append(deprecatedV8String(argument));
+    m_arguments.append(v8String(argument, m_scriptState->isolate()));
 }
 
 void ScriptCallArgumentHandler::appendArgument(long argument)
@@ -118,7 +118,7 @@ ScriptValue ScriptFunctionCall::call(bool& hadException, bool reportExceptions)
     ScriptScope scope(m_scriptState, reportExceptions);
 
     v8::Local<v8::Object> thisObject = m_thisObject.v8Object();
-    v8::Local<v8::Value> value = thisObject->Get(deprecatedV8String(m_name));
+    v8::Local<v8::Value> value = thisObject->Get(v8String(m_name, m_scriptState->isolate()));
     if (!scope.success()) {
         hadException = true;
         return ScriptValue();
@@ -155,7 +155,7 @@ ScriptObject ScriptFunctionCall::construct(bool& hadException, bool reportExcept
     ScriptScope scope(m_scriptState, reportExceptions);
 
     v8::Local<v8::Object> thisObject = m_thisObject.v8Object();
-    v8::Local<v8::Value> value = thisObject->Get(deprecatedV8String(m_name));
+    v8::Local<v8::Value> value = thisObject->Get(v8String(m_name, m_scriptState->isolate()));
     if (!scope.success()) {
         hadException = true;
         return ScriptObject();
index 8df639157e78299f7c392f263a50a5ad1bc22b89..e2ae0414be88426fb3d8b1f333b43a0c37bb466e 100644 (file)
@@ -59,7 +59,7 @@ void ScriptProfiler::start(ScriptState* state, const String& title)
     profileNameIdleTimeMap->add(title, 0);
 
     v8::HandleScope hs;
-    v8::CpuProfiler::StartProfiling(deprecatedV8String(title));
+    v8::CpuProfiler::StartProfiling(v8String(title, state->isolate()));
 }
 
 void ScriptProfiler::startForPage(Page*, const String& title)
@@ -78,8 +78,8 @@ PassRefPtr<ScriptProfile> ScriptProfiler::stop(ScriptState* state, const String&
 {
     v8::HandleScope hs;
     const v8::CpuProfile* profile = state ?
-        v8::CpuProfiler::StopProfiling(deprecatedV8String(title), state->context()->GetSecurityToken()) :
-        v8::CpuProfiler::StopProfiling(deprecatedV8String(title));
+        v8::CpuProfiler::StopProfiling(v8String(title, state->isolate()), state->context()->GetSecurityToken()) :
+        v8::CpuProfiler::StopProfiling(v8String(title, state->isolate()));
     if (!profile)
         return 0;
 
index 6e14be2600c68996f606d45f0a9b45675e0cf74f..c8125d60e165cebf5be8fa4ad8986b009e9fb755 100644 (file)
@@ -246,7 +246,7 @@ bool V8DOMWindowShell::initializeIfNeeded()
         if (m_frame->document()) {
             ContentSecurityPolicy* csp = m_frame->document()->contentSecurityPolicy();
             context->AllowCodeGenerationFromStrings(csp->allowEval(0, ContentSecurityPolicy::SuppressReport));
-            context->SetErrorMessageForCodeGenerationFromStrings(deprecatedV8String(csp->evalDisabledErrorMessage()));
+            context->SetErrorMessageForCodeGenerationFromStrings(v8String(csp->evalDisabledErrorMessage(), m_isolate));
         }
     } else {
         // Using the default security token means that the canAccess is always
@@ -453,7 +453,7 @@ void V8DOMWindowShell::namedItemAdded(HTMLDocument* document, const AtomicString
 
     ASSERT(!m_document.isEmpty());
     checkDocumentWrapper(m_document.get(), document);
-    m_document->SetAccessor(deprecatedV8String(name), getter);
+    m_document->SetAccessor(v8String(name, m_isolate), getter);
 }
 
 void V8DOMWindowShell::namedItemRemoved(HTMLDocument* document, const AtomicString& name)
@@ -471,7 +471,7 @@ void V8DOMWindowShell::namedItemRemoved(HTMLDocument* document, const AtomicStri
 
     ASSERT(!m_document.isEmpty());
     checkDocumentWrapper(m_document.get(), document);
-    m_document->Delete(deprecatedV8String(name));
+    m_document->Delete(v8String(name, m_isolate));
 }
 
 void V8DOMWindowShell::updateSecurityOrigin()
index 471ba2915698a369ca105216f5603acb7f980f6e..04da4de56c8430ffac40b883f84dca7d63e7b4a8 100644 (file)
@@ -155,7 +155,7 @@ void V8LazyEventListener::prepareListenerObject(ScriptExecutionContext* context)
             "};"
         "}}}})";
 
-    v8::Handle<v8::String> codeExternalString = deprecatedV8String(code);
+    v8::Handle<v8::String> codeExternalString = v8String(code, v8Context->GetIsolate());
 
     v8::Handle<v8::Script> script = ScriptSourceCode::compileScript(codeExternalString, m_sourceURL, m_position);
     if (script.IsEmpty())
@@ -185,11 +185,11 @@ void V8LazyEventListener::prepareListenerObject(ScriptExecutionContext* context)
     v8::Local<v8::Object> thisObject = v8::Object::New();
     if (thisObject.IsEmpty())
         return;
-    if (!thisObject->ForceSet(deprecatedV8Integer(0), nodeWrapper))
+    if (!thisObject->ForceSet(v8Integer(0, v8Context->GetIsolate()), nodeWrapper))
         return;
-    if (!thisObject->ForceSet(deprecatedV8Integer(1), formWrapper))
+    if (!thisObject->ForceSet(v8Integer(1, v8Context->GetIsolate()), formWrapper))
         return;
-    if (!thisObject->ForceSet(deprecatedV8Integer(2), documentWrapper))
+    if (!thisObject->ForceSet(v8Integer(2, v8Context->GetIsolate()), documentWrapper))
         return;
 
     // FIXME: Remove this code when we stop doing the 'with' hack above.
@@ -220,11 +220,11 @@ void V8LazyEventListener::prepareListenerObject(ScriptExecutionContext* context)
         toStringFunction = toStringTemplate->GetFunction();
     if (!toStringFunction.IsEmpty()) {
         String toStringString = "function " + m_functionName + "(" + m_eventParameterName + ") {\n  " + m_code + "\n}";
-        wrappedFunction->SetHiddenValue(V8HiddenPropertyName::toStringString(), deprecatedV8String(toStringString));
+        wrappedFunction->SetHiddenValue(V8HiddenPropertyName::toStringString(), v8String(toStringString, v8Context->GetIsolate()));
         wrappedFunction->Set(v8::String::NewSymbol("toString"), toStringFunction);
     }
 
-    wrappedFunction->SetName(deprecatedV8String(m_functionName));
+    wrappedFunction->SetName(v8String(m_functionName, v8Context->GetIsolate()));
 
     // FIXME: Remove the following comment-outs.
     // See https://bugs.webkit.org/show_bug.cgi?id=85152 for more details.
index 9de21168eb029784228e6baac6355dbc42ec2756..7ed3961cab1358c310a349bd951ec2aa6fae5d43 100644 (file)
@@ -63,7 +63,7 @@ bool V8MutationCallback::handleEvent(MutationRecordArray* mutations, MutationObs
 
     v8::Local<v8::Array> mutationsArray = v8::Array::New(mutations->size());
     for (size_t i = 0; i < mutations->size(); ++i)
-        mutationsArray->Set(deprecatedV8Integer(i), toV8(mutations->at(i).get(), v8::Handle<v8::Object>(), v8Context->GetIsolate()));
+        mutationsArray->Set(v8Integer(i, v8Context->GetIsolate()), toV8(mutations->at(i).get(), v8::Handle<v8::Object>(), v8Context->GetIsolate()));
 
     v8::Handle<v8::Value> observerHandle = toV8(observer, v8::Handle<v8::Object>(), v8Context->GetIsolate());
     if (observerHandle.IsEmpty()) {
index f04968d29dfbe9c5e8d8d45700acdaa510104dba..03fd6ba284ef1abd1eddbc8666cbc3f0bfa5a737 100644 (file)
@@ -147,7 +147,7 @@ ScriptValue WorkerScriptController::evaluate(const String& script, const String&
 
     if (!m_disableEvalPending.isEmpty()) {
         m_context->AllowCodeGenerationFromStrings(false);
-        m_context->SetErrorMessageForCodeGenerationFromStrings(deprecatedV8String(m_disableEvalPending));
+        m_context->SetErrorMessageForCodeGenerationFromStrings(v8String(m_disableEvalPending, m_context->GetIsolate()));
         m_disableEvalPending = String();
     }
 
@@ -155,7 +155,7 @@ ScriptValue WorkerScriptController::evaluate(const String& script, const String&
 
     v8::TryCatch block;
 
-    v8::Handle<v8::String> scriptString = deprecatedV8String(script);
+    v8::Handle<v8::String> scriptString = v8String(script, m_context->GetIsolate());
     v8::Handle<v8::Script> compiledScript = ScriptSourceCode::compileScript(scriptString, fileName, scriptStartPosition);
     v8::Local<v8::Value> result = ScriptRunner::runCompiledScript(compiledScript, m_workerContext);
 
index c5398b65c664a6280309da24b3042a9628e129b1..174818211b615bd70bacd2189b6d04ba42d8075c 100644 (file)
@@ -74,7 +74,7 @@ void WorkerScriptDebugServer::addListener(ScriptDebugListener* listener)
     ASSERT(!value->IsUndefined() && value->IsArray());
     v8::Handle<v8::Array> scriptsArray = v8::Handle<v8::Array>::Cast(value);
     for (unsigned i = 0; i < scriptsArray->Length(); ++i)
-        dispatchDidParseSource(listener, v8::Handle<v8::Object>::Cast(scriptsArray->Get(deprecatedV8Integer(i))));
+        dispatchDidParseSource(listener, v8::Handle<v8::Object>::Cast(scriptsArray->Get(v8Integer(i, debuggerContext->GetIsolate()))));
 }
 
 void WorkerScriptDebugServer::removeListener(ScriptDebugListener* listener)
index 7208dc88ddefa81edff082b77d936eb4a7c6a9f6..7b9fe3c6b1437a682fd61b50d0fe183492205f3d 100644 (file)
@@ -96,7 +96,7 @@ ScriptObject InjectedScriptManager::createInjectedScript(const String& scriptSou
     // inspector's stuff) the function is called a few lines below with InjectedScriptHost wrapper,
     // injected script id and explicit reference to the inspected global object. The function is expected
     // to create and configure InjectedScript instance that is going to be used by the inspector.
-    v8::Local<v8::Script> script = v8::Script::Compile(deprecatedV8String(scriptSource));
+    v8::Local<v8::Script> script = v8::Script::Compile(v8String(scriptSource, inspectedContext->GetIsolate()));
     V8RecursionScope::MicrotaskSuppression recursionScope;
     v8::Local<v8::Value> v = script->Run();
     ASSERT(!v.IsEmpty());