Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 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.
| |
| 1011 | |
| 1007 // Returns the frame object of the window object associated with | 1012 // Returns the frame object of the window object associated with |
| 1008 // a context, if the window is currently being displayed in a Frame. | 1013 // a context, if the window is currently being displayed in a Frame. |
| 1009 CORE_EXPORT LocalFrame* toLocalFrameIfNotDetached(v8::Local<v8::Context>); | 1014 CORE_EXPORT LocalFrame* toLocalFrameIfNotDetached(v8::Local<v8::Context>); |
| 1010 | 1015 |
| 1011 // If 'storage' is non-null, it must be large enough to copy all bytes in the | 1016 // 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) | 1017 // array buffer view into it. Use allocateFlexibleArrayBufferStorage(v8Value) |
| 1013 // to allocate it using alloca() in the callers stack frame. | 1018 // to allocate it using alloca() in the callers stack frame. |
| 1014 CORE_EXPORT void toFlexibleArrayBufferView(v8::Isolate*, | 1019 CORE_EXPORT void toFlexibleArrayBufferView(v8::Isolate*, |
| 1015 v8::Local<v8::Value>, | 1020 v8::Local<v8::Value>, |
| 1016 FlexibleArrayBufferView&, | 1021 FlexibleArrayBufferView&, |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1148 // If the argument isn't an object, this will crash. | 1153 // If the argument isn't an object, this will crash. |
| 1149 CORE_EXPORT v8::Local<v8::Value> freezeV8Object(v8::Local<v8::Value>, | 1154 CORE_EXPORT v8::Local<v8::Value> freezeV8Object(v8::Local<v8::Value>, |
| 1150 v8::Isolate*); | 1155 v8::Isolate*); |
| 1151 | 1156 |
| 1152 CORE_EXPORT v8::Local<v8::Value> fromJSONString(v8::Isolate*, | 1157 CORE_EXPORT v8::Local<v8::Value> fromJSONString(v8::Isolate*, |
| 1153 const String& stringifiedJSON, | 1158 const String& stringifiedJSON, |
| 1154 ExceptionState&); | 1159 ExceptionState&); |
| 1155 } // namespace blink | 1160 } // namespace blink |
| 1156 | 1161 |
| 1157 #endif // V8Binding_h | 1162 #endif // V8Binding_h |
| OLD | NEW |