diff options
Diffstat (limited to 'JavaScriptCore/runtime/JSGlobalObject.cpp')
| -rw-r--r-- | JavaScriptCore/runtime/JSGlobalObject.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/JavaScriptCore/runtime/JSGlobalObject.cpp b/JavaScriptCore/runtime/JSGlobalObject.cpp index a8fb7bf..408aea7 100644 --- a/JavaScriptCore/runtime/JSGlobalObject.cpp +++ b/JavaScriptCore/runtime/JSGlobalObject.cpp @@ -455,4 +455,22 @@ void JSGlobalObject::destroyJSGlobalObjectData(void* jsGlobalObjectData) delete static_cast<JSGlobalObjectData*>(jsGlobalObjectData); } +DynamicGlobalObjectScope::DynamicGlobalObjectScope(CallFrame* callFrame, JSGlobalObject* dynamicGlobalObject) + : m_dynamicGlobalObjectSlot(callFrame->globalData().dynamicGlobalObject) + , m_savedDynamicGlobalObject(m_dynamicGlobalObjectSlot) +{ + if (!m_dynamicGlobalObjectSlot) { +#if ENABLE(ASSEMBLER) + if (ExecutableAllocator::underMemoryPressure()) + callFrame->globalData().recompileAllJSFunctions(); +#endif + + m_dynamicGlobalObjectSlot = dynamicGlobalObject; + + // Reset the date cache between JS invocations to force the VM + // to observe time zone changes. + callFrame->globalData().resetDateCache(); + } +} + } // namespace JSC |
