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

Unified Diff: extensions/renderer/script_context.h

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/scoped_persistent.h ('k') | extensions/renderer/script_context.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/script_context.h
diff --git a/extensions/renderer/script_context.h b/extensions/renderer/script_context.h
index 5fd87df9b807c3717829ff089f762cb21349e70d..11d5e886fb0e609589f28234b716bd86e4a2bed3 100644
--- a/extensions/renderer/script_context.h
+++ b/extensions/renderer/script_context.h
@@ -14,7 +14,6 @@
#include "extensions/renderer/module_system.h"
#include "extensions/renderer/request_sender.h"
#include "extensions/renderer/safe_builtins.h"
-#include "extensions/renderer/scoped_persistent.h"
#include "gin/runner.h"
#include "url/gurl.h"
#include "v8/include/v8.h"
@@ -51,7 +50,7 @@ class ScriptContext : public RequestSender::Source {
bool is_valid() const { return !v8_context_.IsEmpty(); }
v8::Handle<v8::Context> v8_context() const {
- return v8_context_.NewHandle(isolate());
+ return v8::Local<v8::Context>::New(isolate_, v8_context_);
}
const Extension* extension() const { return extension_.get(); }
@@ -153,7 +152,7 @@ class ScriptContext : public RequestSender::Source {
protected:
// The v8 context the bindings are accessible to.
- ScopedPersistent<v8::Context> v8_context_;
+ v8::UniquePersistent<v8::Context> v8_context_;
private:
class Runner;
« no previous file with comments | « extensions/renderer/scoped_persistent.h ('k') | extensions/renderer/script_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698