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 1055 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1123 struct NativeValueTraits<Vector<T> > { | 1124 struct NativeValueTraits<Vector<T> > { |
1124 static inline Vector<T> nativeValue(const v8::Handle<v8::Value>& value, v8::
Isolate* isolate, ExceptionState& exceptionState) | 1125 static inline Vector<T> nativeValue(const v8::Handle<v8::Value>& value, v8::
Isolate* isolate, ExceptionState& exceptionState) |
1125 { | 1126 { |
1126 return toImplArray<T>(value, 0, isolate, exceptionState); | 1127 return toImplArray<T>(value, 0, isolate, exceptionState); |
1127 } | 1128 } |
1128 }; | 1129 }; |
1129 | 1130 |
1130 v8::Isolate* toIsolate(ExecutionContext*); | 1131 v8::Isolate* toIsolate(ExecutionContext*); |
1131 v8::Isolate* toIsolate(LocalFrame*); | 1132 v8::Isolate* toIsolate(LocalFrame*); |
1132 | 1133 |
1133 LocalDOMWindow* toDOMWindow(v8::Handle<v8::Value>, v8::Isolate*); | 1134 DOMWindow* toDOMWindow(v8::Handle<v8::Value>, v8::Isolate*); |
1134 LocalDOMWindow* toDOMWindow(v8::Handle<v8::Context>); | 1135 DOMWindow* toDOMWindow(v8::Handle<v8::Context>); |
1135 LocalDOMWindow* enteredDOMWindow(v8::Isolate*); | 1136 LocalDOMWindow* enteredDOMWindow(v8::Isolate*); |
1136 LocalDOMWindow* currentDOMWindow(v8::Isolate*); | 1137 LocalDOMWindow* currentDOMWindow(v8::Isolate*); |
1137 LocalDOMWindow* callingDOMWindow(v8::Isolate*); | 1138 LocalDOMWindow* callingDOMWindow(v8::Isolate*); |
1138 ExecutionContext* toExecutionContext(v8::Handle<v8::Context>); | 1139 ExecutionContext* toExecutionContext(v8::Handle<v8::Context>); |
1139 ExecutionContext* currentExecutionContext(v8::Isolate*); | 1140 ExecutionContext* currentExecutionContext(v8::Isolate*); |
1140 ExecutionContext* callingExecutionContext(v8::Isolate*); | 1141 ExecutionContext* callingExecutionContext(v8::Isolate*); |
1141 | 1142 |
1142 // Returns a V8 context associated with a ExecutionContext and a DOMWrapperWorld
. | 1143 // Returns a V8 context associated with a ExecutionContext and a DOMWrapperWorld
. |
1143 // This method returns an empty context if there is no frame or the frame is alr
eady detached. | 1144 // This method returns an empty context if there is no frame or the frame is alr
eady detached. |
1144 v8::Local<v8::Context> toV8Context(ExecutionContext*, DOMWrapperWorld&); | 1145 v8::Local<v8::Context> toV8Context(ExecutionContext*, DOMWrapperWorld&); |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1257 v8::Local<v8::Value> v8IteratorResult(ScriptState* scriptState, const T& value) | 1258 v8::Local<v8::Value> v8IteratorResult(ScriptState* scriptState, const T& value) |
1258 { | 1259 { |
1259 return v8IteratorResult(scriptState->isolate(), V8ValueTraits<T>::toV8Value(
value, scriptState->context()->Global(), scriptState->isolate())); | 1260 return v8IteratorResult(scriptState->isolate(), V8ValueTraits<T>::toV8Value(
value, scriptState->context()->Global(), scriptState->isolate())); |
1260 } | 1261 } |
1261 | 1262 |
1262 typedef void (*InstallTemplateFunction)(v8::Handle<v8::FunctionTemplate>, v8::Is
olate*); | 1263 typedef void (*InstallTemplateFunction)(v8::Handle<v8::FunctionTemplate>, v8::Is
olate*); |
1263 | 1264 |
1264 } // namespace blink | 1265 } // namespace blink |
1265 | 1266 |
1266 #endif // V8Binding_h | 1267 #endif // V8Binding_h |
OLD | NEW |