| 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 997 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1065 struct NativeValueTraits<Vector<T> > { | 1066 struct NativeValueTraits<Vector<T> > { |
| 1066 static inline Vector<T> nativeValue(const v8::Handle<v8::Value>& value, v8::
Isolate* isolate, ExceptionState& exceptionState) | 1067 static inline Vector<T> nativeValue(const v8::Handle<v8::Value>& value, v8::
Isolate* isolate, ExceptionState& exceptionState) |
| 1067 { | 1068 { |
| 1068 return toImplArray<T>(value, 0, isolate, exceptionState); | 1069 return toImplArray<T>(value, 0, isolate, exceptionState); |
| 1069 } | 1070 } |
| 1070 }; | 1071 }; |
| 1071 | 1072 |
| 1072 v8::Isolate* toIsolate(ExecutionContext*); | 1073 v8::Isolate* toIsolate(ExecutionContext*); |
| 1073 v8::Isolate* toIsolate(LocalFrame*); | 1074 v8::Isolate* toIsolate(LocalFrame*); |
| 1074 | 1075 |
| 1075 LocalDOMWindow* toDOMWindow(v8::Handle<v8::Value>, v8::Isolate*); | 1076 DOMWindow* toDOMWindow(v8::Handle<v8::Value>, v8::Isolate*); |
| 1076 LocalDOMWindow* toDOMWindow(v8::Handle<v8::Context>); | 1077 DOMWindow* toDOMWindow(v8::Handle<v8::Context>); |
| 1077 LocalDOMWindow* enteredDOMWindow(v8::Isolate*); | 1078 LocalDOMWindow* enteredDOMWindow(v8::Isolate*); |
| 1078 LocalDOMWindow* currentDOMWindow(v8::Isolate*); | 1079 LocalDOMWindow* currentDOMWindow(v8::Isolate*); |
| 1079 LocalDOMWindow* callingDOMWindow(v8::Isolate*); | 1080 LocalDOMWindow* callingDOMWindow(v8::Isolate*); |
| 1080 ExecutionContext* toExecutionContext(v8::Handle<v8::Context>); | 1081 ExecutionContext* toExecutionContext(v8::Handle<v8::Context>); |
| 1081 ExecutionContext* currentExecutionContext(v8::Isolate*); | 1082 ExecutionContext* currentExecutionContext(v8::Isolate*); |
| 1082 ExecutionContext* callingExecutionContext(v8::Isolate*); | 1083 ExecutionContext* callingExecutionContext(v8::Isolate*); |
| 1083 | 1084 |
| 1084 // Returns a V8 context associated with a ExecutionContext and a DOMWrapperWorld
. | 1085 // Returns a V8 context associated with a ExecutionContext and a DOMWrapperWorld
. |
| 1085 // This method returns an empty context if there is no frame or the frame is alr
eady detached. | 1086 // This method returns an empty context if there is no frame or the frame is alr
eady detached. |
| 1086 v8::Local<v8::Context> toV8Context(ExecutionContext*, DOMWrapperWorld&); | 1087 v8::Local<v8::Context> toV8Context(ExecutionContext*, DOMWrapperWorld&); |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1199 v8::Local<v8::Value> v8IteratorResult(ScriptState* scriptState, const T& value) | 1200 v8::Local<v8::Value> v8IteratorResult(ScriptState* scriptState, const T& value) |
| 1200 { | 1201 { |
| 1201 return v8IteratorResult(scriptState->isolate(), V8ValueTraits<T>::toV8Value(
value, scriptState->context()->Global(), scriptState->isolate())); | 1202 return v8IteratorResult(scriptState->isolate(), V8ValueTraits<T>::toV8Value(
value, scriptState->context()->Global(), scriptState->isolate())); |
| 1202 } | 1203 } |
| 1203 | 1204 |
| 1204 typedef void (*InstallTemplateFunction)(v8::Handle<v8::FunctionTemplate>, v8::Is
olate*); | 1205 typedef void (*InstallTemplateFunction)(v8::Handle<v8::FunctionTemplate>, v8::Is
olate*); |
| 1205 | 1206 |
| 1206 } // namespace blink | 1207 } // namespace blink |
| 1207 | 1208 |
| 1208 #endif // V8Binding_h | 1209 #endif // V8Binding_h |
| OLD | NEW |