Commit 77a038f7 authored by commit-queue@webkit.org's avatar commit-queue@webkit.org
Browse files

There is a mistake in InspectorProfilerAgent::enable(bool skipRecompile)

https://bugs.webkit.org/show_bug.cgi?id=97450

Patch by Peter Wang <peter.wang@torchmobile.com.cn> on 2012-09-24
Reviewed by Yury Semikhatsky.

The "InspectorProfilerAgent::enable()" should invokes "PageScriptDebugServer" in
no-worker thread.

No new test case.

* inspector/InspectorProfilerAgent.cpp:
(WebCore::PageProfilerAgent::recompileScript):
(PageProfilerAgent):
(WebCore::WorkerProfilerAgent::recompileScript):
(WorkerProfilerAgent):
(WebCore::InspectorProfilerAgent::disable):
(WebCore::InspectorProfilerAgent::enable):
* inspector/InspectorProfilerAgent.h:
(InspectorProfilerAgent):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129438 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent f7d366a9
2012-09-24 Peter Wang <peter.wang@torchmobile.com.cn>
There is a mistake in InspectorProfilerAgent::enable(bool skipRecompile)
https://bugs.webkit.org/show_bug.cgi?id=97450
Reviewed by Yury Semikhatsky.
The "InspectorProfilerAgent::enable()" should invokes "PageScriptDebugServer" in
no-worker thread.
No new test case.
* inspector/InspectorProfilerAgent.cpp:
(WebCore::PageProfilerAgent::recompileScript):
(PageProfilerAgent):
(WebCore::WorkerProfilerAgent::recompileScript):
(WorkerProfilerAgent):
(WebCore::InspectorProfilerAgent::disable):
(WebCore::InspectorProfilerAgent::enable):
* inspector/InspectorProfilerAgent.h:
(InspectorProfilerAgent):
2012-09-24 Patrick Gansterer <paroga@webkit.org>
 
Remove String::operator+=()
......@@ -48,6 +48,7 @@
#include "ScriptObject.h"
#include "ScriptProfile.h"
#include "ScriptProfiler.h"
#include "WorkerScriptDebugServer.h"
#include <wtf/OwnPtr.h>
#include <wtf/text/StringConcatenate.h>
......@@ -70,6 +71,11 @@ public:
virtual ~PageProfilerAgent() { }
private:
virtual void recompileScript()
{
PageScriptDebugServer::shared().recompileAllJSFunctionsSoon();
}
virtual void startProfiling(const String& title)
{
ScriptProfiler::startForPage(m_inspectedPage, title);
......@@ -88,7 +94,6 @@ PassOwnPtr<InspectorProfilerAgent> InspectorProfilerAgent::create(InstrumentingA
return adoptPtr(new PageProfilerAgent(instrumentingAgents, consoleAgent, inspectedPage, inspectorState, injectedScriptManager));
}
#if ENABLE(WORKERS)
class WorkerProfilerAgent : public InspectorProfilerAgent {
public:
......@@ -97,6 +102,8 @@ public:
virtual ~WorkerProfilerAgent() { }
private:
virtual void recompileScript() { }
virtual void startProfiling(const String& title)
{
ScriptProfiler::startForWorkerContext(m_workerContext, title);
......@@ -222,7 +229,7 @@ void InspectorProfilerAgent::disable()
return;
m_enabled = false;
m_headersRequested = false;
PageScriptDebugServer::shared().recompileAllJSFunctionsSoon();
recompileScript();
}
void InspectorProfilerAgent::enable(bool skipRecompile)
......@@ -231,7 +238,7 @@ void InspectorProfilerAgent::enable(bool skipRecompile)
return;
m_enabled = true;
if (!skipRecompile)
PageScriptDebugServer::shared().recompileAllJSFunctionsSoon();
recompileScript();
}
String InspectorProfilerAgent::getCurrentUserInitiatedProfileName(bool incrementProfileNumber)
......
......@@ -73,6 +73,7 @@ public:
void resetState();
virtual void causesRecompilation(ErrorString*, bool*);
virtual void recompileScript() = 0;
virtual void isSampling(ErrorString*, bool*);
virtual void hasHeapProfiler(ErrorString*, bool*);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment