| 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 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 | 211 |
| 212 v8::Local<v8::Context> V8PerIsolateData::ensureScriptRegexpContext() | 212 v8::Local<v8::Context> V8PerIsolateData::ensureScriptRegexpContext() |
| 213 { | 213 { |
| 214 if (!m_scriptRegexpScriptState) { | 214 if (!m_scriptRegexpScriptState) { |
| 215 v8::Local<v8::Context> context(v8::Context::New(isolate())); | 215 v8::Local<v8::Context> context(v8::Context::New(isolate())); |
| 216 m_scriptRegexpScriptState = ScriptState::create(context, DOMWrapperWorld
::create(isolate())); | 216 m_scriptRegexpScriptState = ScriptState::create(context, DOMWrapperWorld
::create(isolate())); |
| 217 } | 217 } |
| 218 return m_scriptRegexpScriptState->context(); | 218 return m_scriptRegexpScriptState->context(); |
| 219 } | 219 } |
| 220 | 220 |
| 221 void V8PerIsolateData::clearScriptRegexpContext() |
| 222 { |
| 223 if (m_scriptRegexpScriptState) |
| 224 m_scriptRegexpScriptState->disposePerContextData(); |
| 225 m_scriptRegexpScriptState.clear(); |
| 226 } |
| 227 |
| 221 bool V8PerIsolateData::hasInstance(const WrapperTypeInfo* untrustedWrapperTypeIn
fo, v8::Local<v8::Value> value) | 228 bool V8PerIsolateData::hasInstance(const WrapperTypeInfo* untrustedWrapperTypeIn
fo, v8::Local<v8::Value> value) |
| 222 { | 229 { |
| 223 return hasInstance(untrustedWrapperTypeInfo, value, m_domTemplateMapForMainW
orld) | 230 return hasInstance(untrustedWrapperTypeInfo, value, m_domTemplateMapForMainW
orld) |
| 224 || hasInstance(untrustedWrapperTypeInfo, value, m_domTemplateMapForNonMa
inWorld); | 231 || hasInstance(untrustedWrapperTypeInfo, value, m_domTemplateMapForNonMa
inWorld); |
| 225 } | 232 } |
| 226 | 233 |
| 227 bool V8PerIsolateData::hasInstance(const WrapperTypeInfo* untrustedWrapperTypeIn
fo, v8::Local<v8::Value> value, DOMTemplateMap& domTemplateMap) | 234 bool V8PerIsolateData::hasInstance(const WrapperTypeInfo* untrustedWrapperTypeIn
fo, v8::Local<v8::Value> value, DOMTemplateMap& domTemplateMap) |
| 228 { | 235 { |
| 229 DOMTemplateMap::iterator result = domTemplateMap.find(untrustedWrapperTypeIn
fo); | 236 DOMTemplateMap::iterator result = domTemplateMap.find(untrustedWrapperTypeIn
fo); |
| 230 if (result == domTemplateMap.end()) | 237 if (result == domTemplateMap.end()) |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 299 m_endOfScopeTasks.clear(); | 306 m_endOfScopeTasks.clear(); |
| 300 } | 307 } |
| 301 | 308 |
| 302 void V8PerIsolateData::setScriptDebugger(PassOwnPtr<ScriptDebuggerBase> debugger
) | 309 void V8PerIsolateData::setScriptDebugger(PassOwnPtr<ScriptDebuggerBase> debugger
) |
| 303 { | 310 { |
| 304 ASSERT(!m_scriptDebugger); | 311 ASSERT(!m_scriptDebugger); |
| 305 m_scriptDebugger = debugger; | 312 m_scriptDebugger = debugger; |
| 306 } | 313 } |
| 307 | 314 |
| 308 } // namespace blink | 315 } // namespace blink |
| OLD | NEW |