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

Unified Diff: extensions/renderer/script_context.cc

Issue 983793003: Replace extensions::ScopedPersistent with v8::UniquePersistent. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « extensions/renderer/script_context.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/script_context.cc
diff --git a/extensions/renderer/script_context.cc b/extensions/renderer/script_context.cc
index b2c3981fec63a16a2468f2e0b928b061a07c98e0..e5677aadb10597498e0b4d5019bc8cc4d084fd8f 100644
--- a/extensions/renderer/script_context.cc
+++ b/extensions/renderer/script_context.cc
@@ -80,7 +80,7 @@ ScriptContext::ScriptContext(const v8::Handle<v8::Context>& v8_context,
Feature::Context context_type,
const Extension* effective_extension,
Feature::Context effective_context_type)
- : v8_context_(v8_context),
+ : v8_context_(v8_context->GetIsolate(), v8_context),
web_frame_(web_frame),
extension_(extension),
context_type_(context_type),
@@ -116,7 +116,7 @@ void ScriptContext::Invalidate() {
if (module_system_)
module_system_->Invalidate();
web_frame_ = NULL;
- v8_context_.reset();
+ v8_context_.Reset();
runner_.reset();
}
@@ -265,7 +265,8 @@ void ScriptContext::OnResponseReceived(const std::string& name,
v8::Integer::New(isolate(), request_id),
v8::String::NewFromUtf8(isolate(), name.c_str()),
v8::Boolean::New(isolate(), success),
- converter->ToV8Value(&response, v8_context_.NewHandle(isolate())),
+ converter->ToV8Value(&response,
+ v8::Local<v8::Context>::New(isolate(), v8_context_)),
v8::String::NewFromUtf8(isolate(), error.c_str())};
v8::Handle<v8::Value> retval = module_system()->CallModuleMethod(
« no previous file with comments | « extensions/renderer/script_context.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698