diff options
author | Ben Murdoch <benm@google.com> | 2011-06-02 12:07:03 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2011-06-10 10:47:21 +0100 |
commit | 2daae5fd11344eaa88a0d92b0f6d65f8d2255c00 (patch) | |
tree | e4964fbd1cb70599f7718ff03e50ea1dab33890b /Source/WebCore/bindings/js/ScriptDebugServer.cpp | |
parent | 87bdf0060a247bfbe668342b87e0874182e0ffa9 (diff) | |
download | external_webkit-2daae5fd11344eaa88a0d92b0f6d65f8d2255c00.zip external_webkit-2daae5fd11344eaa88a0d92b0f6d65f8d2255c00.tar.gz external_webkit-2daae5fd11344eaa88a0d92b0f6d65f8d2255c00.tar.bz2 |
Merge WebKit at r84325: Initial merge by git.
Change-Id: Ic1a909300ecc0a13ddc6b4e784371d2ac6e3d59b
Diffstat (limited to 'Source/WebCore/bindings/js/ScriptDebugServer.cpp')
-rw-r--r-- | Source/WebCore/bindings/js/ScriptDebugServer.cpp | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/Source/WebCore/bindings/js/ScriptDebugServer.cpp b/Source/WebCore/bindings/js/ScriptDebugServer.cpp index 05c0f2c..88e685f 100644 --- a/Source/WebCore/bindings/js/ScriptDebugServer.cpp +++ b/Source/WebCore/bindings/js/ScriptDebugServer.cpp @@ -112,7 +112,7 @@ bool ScriptDebugServer::hasBreakpoint(intptr_t sourceID, const TextPosition0& po if (lineNumber <= 0) return false; LineToBreakpointMap::const_iterator breakIt = it->second.find(lineNumber); - if (breakIt == it->second.end() || !breakIt->second.enabled) + if (breakIt == it->second.end()) return false; // An empty condition counts as no condition which is equivalent to "true". @@ -189,7 +189,7 @@ void ScriptDebugServer::stepOutOfFunction() m_doneProcessingDebuggerEvents = true; } -bool ScriptDebugServer::editScriptSource(const String&, const String&, String&) +bool ScriptDebugServer::editScriptSource(const String&, const String&, String*) { // FIXME(40300): implement this. return false; @@ -214,7 +214,7 @@ void ScriptDebugServer::dispatchDidContinue(ScriptDebugListener* listener) listener->didContinue(); } -void ScriptDebugServer::dispatchDidParseSource(const ListenerSet& listeners, SourceProvider* sourceProvider, ScriptWorldType worldType) +void ScriptDebugServer::dispatchDidParseSource(const ListenerSet& listeners, SourceProvider* sourceProvider, bool isContentScript) { String sourceID = ustringToString(JSC::UString::number(sourceProvider->asID())); String url = ustringToString(sourceProvider->url()); @@ -225,7 +225,7 @@ void ScriptDebugServer::dispatchDidParseSource(const ListenerSet& listeners, Sou Vector<ScriptDebugListener*> copy; copyToVector(listeners, copy); for (size_t i = 0; i < copy.size(); ++i) - copy[i]->didParseSource(sourceID, url, data, lineOffset, columnOffset, worldType); + copy[i]->didParseSource(sourceID, url, data, lineOffset, columnOffset, isContentScript); } void ScriptDebugServer::dispatchFailedToParseSource(const ListenerSet& listeners, SourceProvider* sourceProvider, int errorLine, const String& errorMessage) @@ -240,11 +240,9 @@ void ScriptDebugServer::dispatchFailedToParseSource(const ListenerSet& listeners copy[i]->failedToParseSource(url, data, firstLine, errorLine, errorMessage); } -static ScriptWorldType currentWorldType(ExecState* exec) +static bool isContentScript(ExecState* exec) { - if (currentWorld(exec) == mainThreadNormalWorld()) - return MAIN_WORLD; - return EXTENSIONS_WORLD; + return currentWorld(exec) != mainThreadNormalWorld(); } void ScriptDebugServer::detach(JSGlobalObject* globalObject) @@ -275,10 +273,8 @@ void ScriptDebugServer::sourceParsed(ExecState* exec, SourceProvider* sourceProv bool isError = errorLine != -1; if (isError) dispatchFailedToParseSource(*listeners, sourceProvider, errorLine, ustringToString(errorMessage)); - else { - ScriptWorldType worldType = currentWorldType(exec); - dispatchDidParseSource(*listeners, sourceProvider, worldType); - } + else + dispatchDidParseSource(*listeners, sourceProvider, isContentScript(exec)); m_callingListeners = false; } |