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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 #include "bindings/core/v8/V8StringResource.h" | 43 #include "bindings/core/v8/V8StringResource.h" |
44 #include "bindings/core/v8/V8ThrowException.h" | 44 #include "bindings/core/v8/V8ThrowException.h" |
45 #include "bindings/core/v8/V8ValueCache.h" | 45 #include "bindings/core/v8/V8ValueCache.h" |
46 #include "platform/heap/Heap.h" | 46 #include "platform/heap/Heap.h" |
47 #include "wtf/GetPtr.h" | 47 #include "wtf/GetPtr.h" |
48 #include "wtf/text/AtomicString.h" | 48 #include "wtf/text/AtomicString.h" |
49 #include <v8.h> | 49 #include <v8.h> |
50 | 50 |
51 namespace blink { | 51 namespace blink { |
52 | 52 |
53 class LocalDOMWindow; | 53 class DOMWindow; |
54 class Document; | 54 class Document; |
55 class EventListener; | 55 class EventListener; |
56 class ExecutionContext; | 56 class ExecutionContext; |
57 class ExceptionState; | 57 class ExceptionState; |
| 58 class LocalDOMWindow; |
58 class LocalFrame; | 59 class LocalFrame; |
59 class NodeFilter; | 60 class NodeFilter; |
60 class XPathNSResolver; | 61 class XPathNSResolver; |
61 | 62 |
62 namespace TraceEvent { | 63 namespace TraceEvent { |
63 class ConvertableToTraceFormat; | 64 class ConvertableToTraceFormat; |
64 } | 65 } |
65 | 66 |
66 const int kMaxRecursionDepth = 22; | 67 const int kMaxRecursionDepth = 22; |
67 | 68 |
(...skipping 1008 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1076 struct NativeValueTraits<Vector<T> > { | 1077 struct NativeValueTraits<Vector<T> > { |
1077 static inline Vector<T> nativeValue(const v8::Handle<v8::Value>& value, v8::
Isolate* isolate, ExceptionState& exceptionState) | 1078 static inline Vector<T> nativeValue(const v8::Handle<v8::Value>& value, v8::
Isolate* isolate, ExceptionState& exceptionState) |
1078 { | 1079 { |
1079 return toImplArray<T>(value, 0, isolate, exceptionState); | 1080 return toImplArray<T>(value, 0, isolate, exceptionState); |
1080 } | 1081 } |
1081 }; | 1082 }; |
1082 | 1083 |
1083 v8::Isolate* toIsolate(ExecutionContext*); | 1084 v8::Isolate* toIsolate(ExecutionContext*); |
1084 v8::Isolate* toIsolate(LocalFrame*); | 1085 v8::Isolate* toIsolate(LocalFrame*); |
1085 | 1086 |
1086 LocalDOMWindow* toDOMWindow(v8::Handle<v8::Value>, v8::Isolate*); | 1087 DOMWindow* toDOMWindow(v8::Handle<v8::Value>, v8::Isolate*); |
1087 LocalDOMWindow* toDOMWindow(v8::Handle<v8::Context>); | 1088 DOMWindow* toDOMWindow(v8::Handle<v8::Context>); |
1088 LocalDOMWindow* enteredDOMWindow(v8::Isolate*); | 1089 LocalDOMWindow* enteredDOMWindow(v8::Isolate*); |
1089 LocalDOMWindow* currentDOMWindow(v8::Isolate*); | 1090 LocalDOMWindow* currentDOMWindow(v8::Isolate*); |
1090 LocalDOMWindow* callingDOMWindow(v8::Isolate*); | 1091 LocalDOMWindow* callingDOMWindow(v8::Isolate*); |
1091 ExecutionContext* toExecutionContext(v8::Handle<v8::Context>); | 1092 ExecutionContext* toExecutionContext(v8::Handle<v8::Context>); |
1092 ExecutionContext* currentExecutionContext(v8::Isolate*); | 1093 ExecutionContext* currentExecutionContext(v8::Isolate*); |
1093 ExecutionContext* callingExecutionContext(v8::Isolate*); | 1094 ExecutionContext* callingExecutionContext(v8::Isolate*); |
1094 | 1095 |
1095 // Returns a V8 context associated with a ExecutionContext and a DOMWrapperWorld
. | 1096 // Returns a V8 context associated with a ExecutionContext and a DOMWrapperWorld
. |
1096 // This method returns an empty context if there is no frame or the frame is alr
eady detached. | 1097 // This method returns an empty context if there is no frame or the frame is alr
eady detached. |
1097 v8::Local<v8::Context> toV8Context(ExecutionContext*, DOMWrapperWorld&); | 1098 v8::Local<v8::Context> toV8Context(ExecutionContext*, DOMWrapperWorld&); |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1210 v8::Local<v8::Value> v8IteratorResult(ScriptState* scriptState, const T& value) | 1211 v8::Local<v8::Value> v8IteratorResult(ScriptState* scriptState, const T& value) |
1211 { | 1212 { |
1212 return v8IteratorResult(scriptState->isolate(), V8ValueTraits<T>::toV8Value(
value, scriptState->context()->Global(), scriptState->isolate())); | 1213 return v8IteratorResult(scriptState->isolate(), V8ValueTraits<T>::toV8Value(
value, scriptState->context()->Global(), scriptState->isolate())); |
1213 } | 1214 } |
1214 | 1215 |
1215 typedef void (*InstallTemplateFunction)(v8::Handle<v8::FunctionTemplate>, v8::Is
olate*); | 1216 typedef void (*InstallTemplateFunction)(v8::Handle<v8::FunctionTemplate>, v8::Is
olate*); |
1216 | 1217 |
1217 } // namespace blink | 1218 } // namespace blink |
1218 | 1219 |
1219 #endif // V8Binding_h | 1220 #endif // V8Binding_h |
OLD | NEW |