Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(253)

Unified Diff: Source/bindings/v8/custom/V8InjectedScriptManager.cpp

Issue 23788005: Remove calls to HandleScope default ctor. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: code review (pfeldman) Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/bindings/v8/custom/V8InjectedScriptManager.cpp
diff --git a/Source/bindings/v8/custom/V8InjectedScriptManager.cpp b/Source/bindings/v8/custom/V8InjectedScriptManager.cpp
index b56c839d82f6623a2ac3d5080cbb6434414ec5a8..7316fc94504fc771eba65a86d39dc8deffb991f4 100644
--- a/Source/bindings/v8/custom/V8InjectedScriptManager.cpp
+++ b/Source/bindings/v8/custom/V8InjectedScriptManager.cpp
@@ -68,10 +68,10 @@ static v8::Local<v8::Object> createInjectedScriptHostV8Wrapper(InjectedScriptHos
ScriptObject InjectedScriptManager::createInjectedScript(const String& scriptSource, ScriptState* inspectedScriptState, int id)
{
- v8::HandleScope handleScope;
+ v8::Isolate* isolate = inspectedScriptState->isolate();
+ v8::HandleScope handleScope(isolate);
v8::Local<v8::Context> inspectedContext = inspectedScriptState->context();
- v8::Isolate* isolate = inspectedContext->GetIsolate();
v8::Context::Scope contextScope(inspectedContext);
// Call custom code to create InjectedScripHost wrapper specific for the context
@@ -99,7 +99,7 @@ ScriptObject InjectedScriptManager::createInjectedScript(const String& scriptSou
bool InjectedScriptManager::canAccessInspectedWindow(ScriptState* scriptState)
{
- v8::HandleScope handleScope;
+ v8::HandleScope handleScope(scriptState->isolate());
v8::Local<v8::Context> context = scriptState->context();
v8::Local<v8::Object> global = context->Global();
if (global.IsEmpty())
« no previous file with comments | « Source/bindings/v8/custom/V8InjectedScriptHostCustom.cpp ('k') | Source/bindings/v8/custom/V8PromiseCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698