summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/profiler
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-06-20 13:01:08 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2012-06-20 13:01:08 +0200
commit49233e234e5c787396cadb2cea33b31ae0cd65c1 (patch)
tree5410cb9a8fd53168bb60d62c54b654d86f03c38d /Source/JavaScriptCore/profiler
parentb211c645d8ab690f713515dfdc84d80b11c27d2c (diff)
downloadqtwebkit-49233e234e5c787396cadb2cea33b31ae0cd65c1.tar.gz
Imported WebKit commit 3a8c29f35d00659d2ce7a0ccdfa8304f14e82327 (http://svn.webkit.org/repository/webkit/trunk@120813)
New snapshot with Windows build fixes
Diffstat (limited to 'Source/JavaScriptCore/profiler')
-rw-r--r--Source/JavaScriptCore/profiler/Profiler.cpp7
-rw-r--r--Source/JavaScriptCore/profiler/Profiler.h6
2 files changed, 3 insertions, 10 deletions
diff --git a/Source/JavaScriptCore/profiler/Profiler.cpp b/Source/JavaScriptCore/profiler/Profiler.cpp
index 0ecd5b2c9..723393b5c 100644
--- a/Source/JavaScriptCore/profiler/Profiler.cpp
+++ b/Source/JavaScriptCore/profiler/Profiler.cpp
@@ -51,7 +51,6 @@ static unsigned ProfilesUID = 0;
static CallIdentifier createCallIdentifierFromFunctionImp(ExecState*, JSObject*, const UString& defaultSourceURL, int defaultLineNumber);
Profiler* Profiler::s_sharedProfiler = 0;
-Profiler* Profiler::s_sharedEnabledProfilerReference = 0;
Profiler* Profiler::profiler()
{
@@ -74,7 +73,7 @@ void Profiler::startProfiling(ExecState* exec, const UString& title)
return;
}
- s_sharedEnabledProfilerReference = this;
+ exec->globalData().m_enabledProfiler = this;
RefPtr<ProfileGenerator> profileGenerator = ProfileGenerator::create(exec, title, ++ProfilesUID);
m_currentProfiles.append(profileGenerator);
}
@@ -90,7 +89,7 @@ PassRefPtr<Profile> Profiler::stopProfiling(ExecState* exec, const UString& titl
m_currentProfiles.remove(i);
if (!m_currentProfiles.size())
- s_sharedEnabledProfilerReference = 0;
+ exec->globalData().m_enabledProfiler = 0;
return returnProfile;
}
@@ -107,7 +106,7 @@ void Profiler::stopProfiling(JSGlobalObject* origin)
profileGenerator->stopProfiling();
m_currentProfiles.remove(i);
if (!m_currentProfiles.size())
- s_sharedEnabledProfilerReference = 0;
+ origin->globalData().m_enabledProfiler = 0;
}
}
}
diff --git a/Source/JavaScriptCore/profiler/Profiler.h b/Source/JavaScriptCore/profiler/Profiler.h
index 45f91af44..877065eca 100644
--- a/Source/JavaScriptCore/profiler/Profiler.h
+++ b/Source/JavaScriptCore/profiler/Profiler.h
@@ -48,11 +48,6 @@ namespace JSC {
class Profiler {
WTF_MAKE_FAST_ALLOCATED;
public:
- static Profiler** enabledProfilerReference()
- {
- return &s_sharedEnabledProfilerReference;
- }
-
JS_EXPORT_PRIVATE static Profiler* profiler();
static CallIdentifier createCallIdentifier(ExecState* exec, JSValue, const UString& sourceURL, int lineNumber);
@@ -72,7 +67,6 @@ namespace JSC {
private:
Vector<RefPtr<ProfileGenerator> > m_currentProfiles;
static Profiler* s_sharedProfiler;
- static Profiler* s_sharedEnabledProfilerReference;
};
} // namespace JSC