| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 class DOMWindow; | 55 class DOMWindow; |
| 56 class EventListener; | 56 class EventListener; |
| 57 class EventTarget; | 57 class EventTarget; |
| 58 class ExecutionContext; | 58 class ExecutionContext; |
| 59 class ExceptionState; | 59 class ExceptionState; |
| 60 class Frame; | 60 class Frame; |
| 61 class LocalDOMWindow; | 61 class LocalDOMWindow; |
| 62 class LocalFrame; | 62 class LocalFrame; |
| 63 class NodeFilter; | 63 class NodeFilter; |
| 64 class XPathNSResolver; | 64 class XPathNSResolver; |
| 65 class FlexibleArrayBufferView; |
| 65 | 66 |
| 66 template <typename T> | 67 template <typename T> |
| 67 struct V8TypeOf { | 68 struct V8TypeOf { |
| 68 // |Type| provides C++ -> V8 type conversion for DOM wrappers. | 69 // |Type| provides C++ -> V8 type conversion for DOM wrappers. |
| 69 // The Blink binding code generator will generate specialized version of | 70 // The Blink binding code generator will generate specialized version of |
| 70 // V8TypeOf for each wrapper class. | 71 // V8TypeOf for each wrapper class. |
| 71 typedef void Type; | 72 typedef void Type; |
| 72 }; | 73 }; |
| 73 | 74 |
| 74 namespace TraceEvent { | 75 namespace TraceEvent { |
| (...skipping 815 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 890 // Returns a V8 context associated with a Frame and a DOMWrapperWorld. | 891 // Returns a V8 context associated with a Frame and a DOMWrapperWorld. |
| 891 // This method returns an empty context if the frame is already detached. | 892 // This method returns an empty context if the frame is already detached. |
| 892 CORE_EXPORT v8::Local<v8::Context> toV8Context(Frame*, DOMWrapperWorld&); | 893 CORE_EXPORT v8::Local<v8::Context> toV8Context(Frame*, DOMWrapperWorld&); |
| 893 | 894 |
| 894 // Returns the frame object of the window object associated with | 895 // Returns the frame object of the window object associated with |
| 895 // a context, if the window is currently being displayed in a Frame. | 896 // a context, if the window is currently being displayed in a Frame. |
| 896 CORE_EXPORT Frame* toFrameIfNotDetached(v8::Handle<v8::Context>); | 897 CORE_EXPORT Frame* toFrameIfNotDetached(v8::Handle<v8::Context>); |
| 897 | 898 |
| 898 CORE_EXPORT EventTarget* toEventTarget(v8::Isolate*, v8::Handle<v8::Value>); | 899 CORE_EXPORT EventTarget* toEventTarget(v8::Isolate*, v8::Handle<v8::Value>); |
| 899 | 900 |
| 901 // If 'storage' is non-null, it must be large enough to copy all bytes in the |
| 902 // array buffer view into it. |
| 903 // Use SMALL_ARRAY_BUFFER_VIEW_STORAGE(v8Value) to allocate it using alloca() in |
| 904 // the callers stack frame. |
| 905 CORE_EXPORT void toFlexibleArrayBufferView(v8::Isolate*, v8::Handle<v8::Value>,
FlexibleArrayBufferView&, void* storage = nullptr); |
| 906 |
| 900 // If the current context causes out of memory, JavaScript setting | 907 // If the current context causes out of memory, JavaScript setting |
| 901 // is disabled and it returns true. | 908 // is disabled and it returns true. |
| 902 bool handleOutOfMemory(); | 909 bool handleOutOfMemory(); |
| 903 void crashIfV8IsDead(); | 910 void crashIfV8IsDead(); |
| 904 | 911 |
| 905 inline bool isUndefinedOrNull(v8::Handle<v8::Value> value) | 912 inline bool isUndefinedOrNull(v8::Handle<v8::Value> value) |
| 906 { | 913 { |
| 907 return value->IsNull() || value->IsUndefined(); | 914 return value->IsNull() || value->IsUndefined(); |
| 908 } | 915 } |
| 909 v8::Handle<v8::Function> getBoundFunction(v8::Handle<v8::Function>); | 916 v8::Handle<v8::Function> getBoundFunction(v8::Handle<v8::Function>); |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 999 PassRefPtr<TraceEvent::ConvertableToTraceFormat> devToolsTraceEventData(v8::Isol
ate*, ExecutionContext*, v8::Handle<v8::Function>); | 1006 PassRefPtr<TraceEvent::ConvertableToTraceFormat> devToolsTraceEventData(v8::Isol
ate*, ExecutionContext*, v8::Handle<v8::Function>); |
| 1000 | 1007 |
| 1001 // Callback functions used by generated code. | 1008 // Callback functions used by generated code. |
| 1002 CORE_EXPORT void v8ConstructorAttributeGetter(v8::Local<v8::Name> propertyName,
const v8::PropertyCallbackInfo<v8::Value>&); | 1009 CORE_EXPORT void v8ConstructorAttributeGetter(v8::Local<v8::Name> propertyName,
const v8::PropertyCallbackInfo<v8::Value>&); |
| 1003 | 1010 |
| 1004 typedef void (*InstallTemplateFunction)(v8::Local<v8::FunctionTemplate>, v8::Iso
late*); | 1011 typedef void (*InstallTemplateFunction)(v8::Local<v8::FunctionTemplate>, v8::Iso
late*); |
| 1005 | 1012 |
| 1006 } // namespace blink | 1013 } // namespace blink |
| 1007 | 1014 |
| 1008 #endif // V8Binding_h | 1015 #endif // V8Binding_h |
| OLD | NEW |