OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 11 matching lines...) Expand all Loading... |
22 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF | 22 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF |
23 * THE POSSIBILITY OF SUCH DAMAGE. | 23 * THE POSSIBILITY OF SUCH DAMAGE. |
24 */ | 24 */ |
25 | 25 |
26 #include "config.h" | 26 #include "config.h" |
27 #include "bindings/v8/V8PerIsolateData.h" | 27 #include "bindings/v8/V8PerIsolateData.h" |
28 | 28 |
29 #include "bindings/v8/DOMDataStore.h" | 29 #include "bindings/v8/DOMDataStore.h" |
30 #include "bindings/v8/ScriptGCEvent.h" | 30 #include "bindings/v8/ScriptGCEvent.h" |
31 #include "bindings/v8/ScriptProfiler.h" | 31 #include "bindings/v8/ScriptProfiler.h" |
| 32 #include "bindings/v8/ThenableCoercions.h" |
32 #include "bindings/v8/V8Binding.h" | 33 #include "bindings/v8/V8Binding.h" |
33 #include "bindings/v8/V8HiddenPropertyName.h" | 34 #include "bindings/v8/V8HiddenPropertyName.h" |
34 #include "bindings/v8/V8ObjectConstructor.h" | 35 #include "bindings/v8/V8ObjectConstructor.h" |
35 #include "bindings/v8/V8ScriptRunner.h" | 36 #include "bindings/v8/V8ScriptRunner.h" |
36 | 37 |
37 namespace WebCore { | 38 namespace WebCore { |
38 | 39 |
39 V8PerIsolateData::V8PerIsolateData(v8::Isolate* isolate) | 40 V8PerIsolateData::V8PerIsolateData(v8::Isolate* isolate) |
40 : m_isolate(isolate) | 41 : m_isolate(isolate) |
41 , m_stringCache(adoptPtr(new StringCache())) | 42 , m_stringCache(adoptPtr(new StringCache())) |
| 43 , m_thenableCoercions(ThenableCoercions::create()) |
42 , m_workerDomDataStore(0) | 44 , m_workerDomDataStore(0) |
43 , m_hiddenPropertyName(adoptPtr(new V8HiddenPropertyName())) | 45 , m_hiddenPropertyName(adoptPtr(new V8HiddenPropertyName())) |
44 , m_constructorMode(ConstructorMode::CreateNewObject) | 46 , m_constructorMode(ConstructorMode::CreateNewObject) |
45 , m_recursionLevel(0) | 47 , m_recursionLevel(0) |
46 #ifndef NDEBUG | 48 #ifndef NDEBUG |
47 , m_internalScriptRecursionLevel(0) | 49 , m_internalScriptRecursionLevel(0) |
48 #endif | 50 #endif |
49 , m_gcEventData(adoptPtr(new GCEventData())) | 51 , m_gcEventData(adoptPtr(new GCEventData())) |
50 , m_shouldCollectGarbageSoon(false) | 52 , m_shouldCollectGarbageSoon(false) |
51 { | 53 { |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 // obscure and unlikely to be a problem. | 163 // obscure and unlikely to be a problem. |
162 v8::Handle<v8::Value> value = args.Callee()->Get(v8::String::NewSymbol("toSt
ring")); | 164 v8::Handle<v8::Value> value = args.Callee()->Get(v8::String::NewSymbol("toSt
ring")); |
163 if (!value->IsFunction()) { | 165 if (!value->IsFunction()) { |
164 v8SetReturnValue(args, v8::String::Empty(args.GetIsolate())); | 166 v8SetReturnValue(args, v8::String::Empty(args.GetIsolate())); |
165 return; | 167 return; |
166 } | 168 } |
167 v8SetReturnValue(args, V8ScriptRunner::callInternalFunction(v8::Handle<v8::F
unction>::Cast(value), args.This(), 0, 0, v8::Isolate::GetCurrent())); | 169 v8SetReturnValue(args, V8ScriptRunner::callInternalFunction(v8::Handle<v8::F
unction>::Cast(value), args.This(), 0, 0, v8::Isolate::GetCurrent())); |
168 } | 170 } |
169 | 171 |
170 } // namespace WebCore | 172 } // namespace WebCore |
OLD | NEW |