| 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 12 matching lines...) Expand all Loading... |
| 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/V8Binding.h" | 32 #include "bindings/v8/V8Binding.h" |
| 33 #include "bindings/v8/V8HiddenPropertyName.h" | |
| 34 #include "bindings/v8/V8ObjectConstructor.h" | 33 #include "bindings/v8/V8ObjectConstructor.h" |
| 35 #include "bindings/v8/V8ScriptRunner.h" | 34 #include "bindings/v8/V8ScriptRunner.h" |
| 36 | 35 |
| 37 namespace WebCore { | 36 namespace WebCore { |
| 38 | 37 |
| 39 V8PerIsolateData::V8PerIsolateData(v8::Isolate* isolate) | 38 V8PerIsolateData::V8PerIsolateData(v8::Isolate* isolate) |
| 40 : m_isolate(isolate) | 39 : m_isolate(isolate) |
| 41 , m_stringCache(adoptPtr(new StringCache())) | 40 , m_stringCache(adoptPtr(new StringCache())) |
| 42 , m_workerDomDataStore(0) | 41 , m_workerDomDataStore(0) |
| 43 , m_hiddenPropertyName(adoptPtr(new V8HiddenPropertyName())) | |
| 44 , m_constructorMode(ConstructorMode::CreateNewObject) | 42 , m_constructorMode(ConstructorMode::CreateNewObject) |
| 45 , m_recursionLevel(0) | 43 , m_recursionLevel(0) |
| 46 #ifndef NDEBUG | 44 #ifndef NDEBUG |
| 47 , m_internalScriptRecursionLevel(0) | 45 , m_internalScriptRecursionLevel(0) |
| 48 #endif | 46 #endif |
| 49 , m_gcEventData(adoptPtr(new GCEventData())) | 47 , m_gcEventData(adoptPtr(new GCEventData())) |
| 50 , m_shouldCollectGarbageSoon(false) | 48 , m_shouldCollectGarbageSoon(false) |
| 51 { | 49 { |
| 52 } | 50 } |
| 53 | 51 |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 // obscure and unlikely to be a problem. | 155 // obscure and unlikely to be a problem. |
| 158 v8::Handle<v8::Value> value = info.Callee()->Get(v8AtomicString(info.GetIsol
ate(), "toString")); | 156 v8::Handle<v8::Value> value = info.Callee()->Get(v8AtomicString(info.GetIsol
ate(), "toString")); |
| 159 if (!value->IsFunction()) { | 157 if (!value->IsFunction()) { |
| 160 v8SetReturnValue(info, v8::String::Empty(info.GetIsolate())); | 158 v8SetReturnValue(info, v8::String::Empty(info.GetIsolate())); |
| 161 return; | 159 return; |
| 162 } | 160 } |
| 163 v8SetReturnValue(info, V8ScriptRunner::callInternalFunction(v8::Handle<v8::F
unction>::Cast(value), info.This(), 0, 0, v8::Isolate::GetCurrent())); | 161 v8SetReturnValue(info, V8ScriptRunner::callInternalFunction(v8::Handle<v8::F
unction>::Cast(value), info.This(), 0, 0, v8::Isolate::GetCurrent())); |
| 164 } | 162 } |
| 165 | 163 |
| 166 } // namespace WebCore | 164 } // namespace WebCore |
| OLD | NEW |