From 49233e234e5c787396cadb2cea33b31ae0cd65c1 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Wed, 20 Jun 2012 13:01:08 +0200 Subject: Imported WebKit commit 3a8c29f35d00659d2ce7a0ccdfa8304f14e82327 (http://svn.webkit.org/repository/webkit/trunk@120813) New snapshot with Windows build fixes --- Source/JavaScriptCore/runtime/JSGlobalData.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'Source/JavaScriptCore/runtime/JSGlobalData.cpp') diff --git a/Source/JavaScriptCore/runtime/JSGlobalData.cpp b/Source/JavaScriptCore/runtime/JSGlobalData.cpp index a13eb79c5..1fb90df40 100644 --- a/Source/JavaScriptCore/runtime/JSGlobalData.cpp +++ b/Source/JavaScriptCore/runtime/JSGlobalData.cpp @@ -54,6 +54,7 @@ #include "RegExpObject.h" #include "StrictEvalActivation.h" #include "StrongInlines.h" +#include #include #include @@ -100,13 +101,10 @@ static bool enableAssembler(ExecutableAllocator& executableAllocator) return false; #if USE(CF) - CFStringRef canUseJITKey = CFStringCreateWithCString(0 , "JavaScriptCoreUseJIT", kCFStringEncodingMacRoman); - CFBooleanRef canUseJIT = (CFBooleanRef)CFPreferencesCopyAppValue(canUseJITKey, kCFPreferencesCurrentApplication); - if (canUseJIT) { - return kCFBooleanTrue == canUseJIT; - CFRelease(canUseJIT); - } - CFRelease(canUseJITKey); + RetainPtr canUseJITKey(AdoptCF, CFStringCreateWithCString(0 , "JavaScriptCoreUseJIT", kCFStringEncodingMacRoman)); + RetainPtr canUseJIT(AdoptCF, (CFBooleanRef)CFPreferencesCopyAppValue(canUseJITKey.get(), kCFPreferencesCurrentApplication)); + if (canUseJIT) + return kCFBooleanTrue == canUseJIT.get(); #endif #if USE(CF) || OS(UNIX) @@ -159,6 +157,7 @@ JSGlobalData::JSGlobalData(GlobalDataType globalDataType, ThreadStackType thread , dynamicGlobalObject(0) , cachedUTCOffset(std::numeric_limits::quiet_NaN()) , maxReentryDepth(threadStackType == ThreadStackTypeSmall ? MaxSmallThreadReentryDepth : MaxLargeThreadReentryDepth) + , m_enabledProfiler(0) , m_regExpCache(new RegExpCache(this)) #if ENABLE(REGEXP_TRACING) , m_rtTraceList(new RTTraceList()) @@ -418,7 +417,7 @@ struct StackPreservingRecompiler : public MarkedBlock::VoidFunctor { FunctionExecutable* executable = jsCast(cell); if (currentlyExecutingFunctions.contains(executable)) return; - executable->discardCode(); + executable->clearCodeIfNotCompiling(); } }; -- cgit v1.2.1