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

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

Issue 2794023002: Move ScriptState::forWorld/ScriptState::forMainWorld (Part 1) (Closed)
Patch Set: Code review changes Created 3 years, 8 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * Copyright (C) 2012 Ericsson AB. All rights reserved. 3 * Copyright (C) 2012 Ericsson AB. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 986 matching lines...) Expand 10 before | Expand all | Expand 10 after
997 CORE_EXPORT v8::Local<v8::Context> toV8Context(ExecutionContext*, 997 CORE_EXPORT v8::Local<v8::Context> toV8Context(ExecutionContext*,
998 DOMWrapperWorld&); 998 DOMWrapperWorld&);
999 // Returns a V8 context associated with a Frame and a DOMWrapperWorld. 999 // Returns a V8 context associated with a Frame and a DOMWrapperWorld.
1000 // This method returns an empty context if the frame is already detached. 1000 // This method returns an empty context if the frame is already detached.
1001 CORE_EXPORT v8::Local<v8::Context> toV8Context(LocalFrame*, DOMWrapperWorld&); 1001 CORE_EXPORT v8::Local<v8::Context> toV8Context(LocalFrame*, DOMWrapperWorld&);
1002 // Like toV8Context but also returns the context if the frame is already 1002 // Like toV8Context but also returns the context if the frame is already
1003 // detached. 1003 // detached.
1004 CORE_EXPORT v8::Local<v8::Context> toV8ContextEvenIfDetached(LocalFrame*, 1004 CORE_EXPORT v8::Local<v8::Context> toV8ContextEvenIfDetached(LocalFrame*,
1005 DOMWrapperWorld&); 1005 DOMWrapperWorld&);
1006 1006
1007 // These methods can return nullptr if the context associated with the
1008 // ScriptState has already been detached.
1009 CORE_EXPORT ScriptState* toScriptState(LocalFrame*, DOMWrapperWorld&);
1010 // Do not use this method unless you are sure you should use the main world's
1011 // ScriptState
1012 CORE_EXPORT ScriptState* toScriptStateForMainWorld(LocalFrame*);
1013
1007 // Returns the frame object of the window object associated with 1014 // Returns the frame object of the window object associated with
1008 // a context, if the window is currently being displayed in a Frame. 1015 // a context, if the window is currently being displayed in a Frame.
1009 CORE_EXPORT LocalFrame* toLocalFrameIfNotDetached(v8::Local<v8::Context>); 1016 CORE_EXPORT LocalFrame* toLocalFrameIfNotDetached(v8::Local<v8::Context>);
1010 1017
1011 // If 'storage' is non-null, it must be large enough to copy all bytes in the 1018 // If 'storage' is non-null, it must be large enough to copy all bytes in the
1012 // array buffer view into it. Use allocateFlexibleArrayBufferStorage(v8Value) 1019 // array buffer view into it. Use allocateFlexibleArrayBufferStorage(v8Value)
1013 // to allocate it using alloca() in the callers stack frame. 1020 // to allocate it using alloca() in the callers stack frame.
1014 CORE_EXPORT void toFlexibleArrayBufferView(v8::Isolate*, 1021 CORE_EXPORT void toFlexibleArrayBufferView(v8::Isolate*,
1015 v8::Local<v8::Value>, 1022 v8::Local<v8::Value>,
1016 FlexibleArrayBufferView&, 1023 FlexibleArrayBufferView&,
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
1148 // If the argument isn't an object, this will crash. 1155 // If the argument isn't an object, this will crash.
1149 CORE_EXPORT v8::Local<v8::Value> freezeV8Object(v8::Local<v8::Value>, 1156 CORE_EXPORT v8::Local<v8::Value> freezeV8Object(v8::Local<v8::Value>,
1150 v8::Isolate*); 1157 v8::Isolate*);
1151 1158
1152 CORE_EXPORT v8::Local<v8::Value> fromJSONString(v8::Isolate*, 1159 CORE_EXPORT v8::Local<v8::Value> fromJSONString(v8::Isolate*,
1153 const String& stringifiedJSON, 1160 const String& stringifiedJSON,
1154 ExceptionState&); 1161 ExceptionState&);
1155 } // namespace blink 1162 } // namespace blink
1156 1163
1157 #endif // V8Binding_h 1164 #endif // V8Binding_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/ScriptState.cpp ('k') | third_party/WebKit/Source/bindings/core/v8/V8Binding.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698