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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/V8Binding.h

Issue 2794023002: Move ScriptState::forWorld/ScriptState::forMainWorld (Part 1) (Closed)
Patch Set: Some fixes Created 3 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
Index: third_party/WebKit/Source/bindings/core/v8/V8Binding.h
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8Binding.h b/third_party/WebKit/Source/bindings/core/v8/V8Binding.h
index 81b839e5862974baf9cb0b5b6aac647a29e9b3a4..e35ea88bd7f72aea536e54f005095eeb35867a8d 100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8Binding.h
+++ b/third_party/WebKit/Source/bindings/core/v8/V8Binding.h
@@ -1004,6 +1004,11 @@ CORE_EXPORT v8::Local<v8::Context> toV8Context(LocalFrame*, DOMWrapperWorld&);
CORE_EXPORT v8::Local<v8::Context> toV8ContextEvenIfDetached(LocalFrame*,
DOMWrapperWorld&);
+// These methods can return nullptr if the context associated with the
+// ScriptState has already been detached.
+CORE_EXPORT ScriptState* toScriptState(LocalFrame*, DOMWrapperWorld&);
+CORE_EXPORT ScriptState* toScriptStateForMainWorld(LocalFrame*);
haraken 2017/04/04 02:26:44 Nit: I'd add: // Do not use this method unless
adithyas 2017/04/04 14:22:42 Done.
+
// Returns the frame object of the window object associated with
// a context, if the window is currently being displayed in a Frame.
CORE_EXPORT LocalFrame* toLocalFrameIfNotDetached(v8::Local<v8::Context>);

Powered by Google App Engine
This is Rietveld 408576698