| 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 { | 47 { |
| 48 ASSERT(V8RecursionScope::properlyUsed(v8::Isolate::GetCurrent())); | 48 ASSERT(V8RecursionScope::properlyUsed(v8::Isolate::GetCurrent())); |
| 49 } | 49 } |
| 50 #endif | 50 #endif |
| 51 | 51 |
| 52 V8PerIsolateData::V8PerIsolateData(v8::Isolate* isolate) | 52 V8PerIsolateData::V8PerIsolateData(v8::Isolate* isolate) |
| 53 : m_isolate(isolate) | 53 : m_isolate(isolate) |
| 54 , m_isolateHolder(adoptPtr(new gin::IsolateHolder(m_isolate, v8ArrayBufferAl
locator()))) | 54 , m_isolateHolder(adoptPtr(new gin::IsolateHolder(m_isolate, v8ArrayBufferAl
locator()))) |
| 55 , m_stringCache(adoptPtr(new StringCache(m_isolate))) | 55 , m_stringCache(adoptPtr(new StringCache(m_isolate))) |
| 56 , m_hiddenValue(adoptPtr(new V8HiddenValue())) | 56 , m_hiddenValue(adoptPtr(new V8HiddenValue())) |
| 57 , m_compiledPrivateScript(isolate) |
| 57 , m_constructorMode(ConstructorMode::CreateNewObject) | 58 , m_constructorMode(ConstructorMode::CreateNewObject) |
| 58 , m_recursionLevel(0) | 59 , m_recursionLevel(0) |
| 59 #ifndef NDEBUG | 60 #ifndef NDEBUG |
| 60 , m_internalScriptRecursionLevel(0) | 61 , m_internalScriptRecursionLevel(0) |
| 61 #endif | 62 #endif |
| 62 , m_gcEventData(adoptPtr(new GCEventData())) | 63 , m_gcEventData(adoptPtr(new GCEventData())) |
| 63 , m_performingMicrotaskCheckpoint(false) | 64 , m_performingMicrotaskCheckpoint(false) |
| 64 { | 65 { |
| 65 #ifndef NDEBUG | 66 #ifndef NDEBUG |
| 66 // currentThread will always be non-null in production, but can be null in C
hromium unit tests. | 67 // currentThread will always be non-null in production, but can be null in C
hromium unit tests. |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 v8SetReturnValue(info, V8ScriptRunner::callInternalFunction(v8::Handle<v8::F
unction>::Cast(value), info.This(), 0, 0, info.GetIsolate())); | 210 v8SetReturnValue(info, V8ScriptRunner::callInternalFunction(v8::Handle<v8::F
unction>::Cast(value), info.This(), 0, 0, info.GetIsolate())); |
| 210 } | 211 } |
| 211 | 212 |
| 212 v8::Handle<v8::FunctionTemplate> V8PerIsolateData::toStringTemplate() | 213 v8::Handle<v8::FunctionTemplate> V8PerIsolateData::toStringTemplate() |
| 213 { | 214 { |
| 214 if (m_toStringTemplate.isEmpty()) | 215 if (m_toStringTemplate.isEmpty()) |
| 215 m_toStringTemplate.set(m_isolate, v8::FunctionTemplate::New(m_isolate, c
onstructorOfToString)); | 216 m_toStringTemplate.set(m_isolate, v8::FunctionTemplate::New(m_isolate, c
onstructorOfToString)); |
| 216 return m_toStringTemplate.newLocal(m_isolate); | 217 return m_toStringTemplate.newLocal(m_isolate); |
| 217 } | 218 } |
| 218 | 219 |
| 220 v8::Handle<v8::Value> V8PerIsolateData::compiledPrivateScript(String className) |
| 221 { |
| 222 return m_compiledPrivateScript.Get(className); |
| 223 } |
| 224 |
| 225 void V8PerIsolateData::setCompiledPrivateScript(String className, v8::Handle<v8:
:Value> compiledObject) |
| 226 { |
| 227 m_compiledPrivateScript.Set(className, compiledObject); |
| 228 } |
| 229 |
| 219 } // namespace WebCore | 230 } // namespace WebCore |
| OLD | NEW |