Changeset 161691 in webkit
- Timestamp:
- Jan 10, 2014 3:55:09 PM (10 years ago)
- Location:
- trunk/Source
- Files:
-
- 22 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r161686 r161691 1 2014-01-10 Joseph Pecoraro <pecoraro@apple.com> 2 3 Web Inspector: Remove unimplemented or static ScriptDebugServer features 4 https://bugs.webkit.org/show_bug.cgi?id=126784 5 6 Reviewed by Timothy Hatcher. 7 8 * inspector/protocol/Debugger.json: 9 1 10 2014-01-10 Michael Saboff <msaboff@apple.com> 2 11 -
trunk/Source/JavaScriptCore/inspector/protocol/Debugger.json
r160683 r161691 83 83 "commands": [ 84 84 { 85 "name": "causesRecompilation",86 "returns": [87 { "name": "result", "type": "boolean", "description": "True if enabling debugger causes scripts recompilation." }88 ],89 "description": "Tells whether enabling debugger causes scripts recompilation."90 },91 {92 "name": "supportsSeparateScriptCompilationAndExecution",93 "returns": [94 { "name": "result", "type": "boolean", "description": "True if debugger supports separate script compilation and execution." }95 ],96 "description": "Tells whether debugger supports separate script compilation and execution."97 },98 {99 85 "name": "enable", 100 86 "description": "Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received." … … 184 170 ], 185 171 "description": "Searches for given string in script content." 186 },187 {188 "name": "canSetScriptSource",189 "returns": [190 { "name": "result", "type": "boolean", "description": "True if <code>setScriptSource</code> is supported." }191 ],192 "description": "Tells whether <code>setScriptSource</code> is supported."193 },194 {195 "name": "setScriptSource",196 "parameters": [197 { "name": "scriptId", "$ref": "ScriptId", "description": "Id of the script to edit." },198 { "name": "scriptSource", "type": "string", "description": "New content of the script." },199 { "name": "preview", "type": "boolean", "optional": true, "description": " If true the change will not actually be applied. Preview mode may be used to get result description without actually modifying the code." }200 ],201 "returns": [202 { "name": "callFrames", "type": "array", "optional": true, "items": { "$ref": "CallFrame"}, "description": "New stack trace in case editing has happened while VM was stopped." },203 { "name": "result", "type": "object", "optional": true, "description": "VM-specific description of the changes applied." }204 ],205 "description": "Edits JavaScript source live."206 172 }, 207 173 { … … 248 214 ], 249 215 "description": "Evaluates expression on a given call frame." 250 },251 {252 "name": "compileScript",253 "parameters": [254 { "name": "expression", "type": "string", "description": "Expression to compile." },255 { "name": "sourceURL", "type": "string", "description": "Source url to be set for the script." }256 ],257 "returns": [258 { "name": "scriptId", "$ref": "ScriptId", "optional": true, "description": "Id of the script." },259 { "name": "syntaxErrorMessage", "type": "string", "optional": true, "description": "Syntax error message if compilation failed." }260 ],261 "description": "Compiles expression."262 },263 {264 "name": "runScript",265 "parameters": [266 { "name": "scriptId", "$ref": "ScriptId", "description": "Id of the script to run." },267 { "name": "contextId", "$ref": "Runtime.ExecutionContextId", "optional": true, "description": "Specifies in which isolated context to perform script run. Each content script lives in an isolated context and this parameter may be used to specify one of those contexts. If the parameter is omitted or 0 the evaluation will be performed in the context of the inspected page." },268 { "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name that can be used to release multiple objects." },269 { "name": "doNotPauseOnExceptionsAndMuteConsole", "type": "boolean", "optional": true, "description": "Specifies whether script run should stop on exceptions and mute console. Overrides setPauseOnException state." }270 ],271 "returns": [272 { "name": "result", "$ref": "Runtime.RemoteObject", "description": "Run result." },273 { "name": "wasThrown", "type": "boolean", "optional": true, "description": "True if the result was thrown during the script run." }274 ],275 "description": "Runs script with given id in a given context."276 216 }, 277 217 { -
trunk/Source/WebCore/ChangeLog
r161690 r161691 1 2014-01-10 Joseph Pecoraro <pecoraro@apple.com> 2 3 Web Inspector: Remove unimplemented or static ScriptDebugServer features 4 https://bugs.webkit.org/show_bug.cgi?id=126784 5 6 Reviewed by Timothy Hatcher. 7 8 These features are unimplemented in the backend, and unused by the 9 current frontend. Most deal with features that were supported by v8 10 and are as yet unimplemented by JSC. If we decide to add such features 11 we can reimplement without conforming to an old implementation. 12 13 * bindings/js/ScriptDebugServer.cpp: 14 * bindings/js/ScriptDebugServer.h: 15 * bindings/js/ScriptProfiler.h: 16 * inspector/InspectorDebuggerAgent.cpp: 17 (WebCore::InspectorDebuggerAgent::disable): 18 * inspector/InspectorDebuggerAgent.h: 19 * inspector/InspectorPageAgent.cpp: 20 (WebCore::InspectorPageAgent::reload): 21 (WebCore::InspectorPageAgent::frameNavigated): 22 * inspector/InspectorPageAgent.h: 23 * inspector/InspectorProfilerAgent.cpp: 24 * inspector/InspectorProfilerAgent.h: 25 * inspector/PageDebuggerAgent.cpp: 26 (WebCore::PageDebuggerAgent::didClearMainFrameWindowObject): 27 * inspector/protocol/Page.json: 28 * inspector/protocol/Profiler.json: 29 1 30 2014-01-10 David Kilzer <ddkilzer@apple.com> 2 31 -
trunk/Source/WebCore/bindings/js/ScriptDebugServer.cpp
r161638 r161691 132 132 } 133 133 134 bool ScriptDebugServer::canSetScriptSource()135 {136 return false;137 }138 139 bool ScriptDebugServer::setScriptSource(const String&, const String&, bool, String*, Deprecated::ScriptValue*, Deprecated::ScriptObject*)140 {141 // FIXME(40300): implement this.142 return false;143 }144 145 146 void ScriptDebugServer::updateCallStack(Deprecated::ScriptValue*)147 {148 // This method is used for restart frame feature that is not implemented yet.149 // FIXME(40300): implement this.150 }151 152 134 void ScriptDebugServer::dispatchDidPause(ScriptDebugListener* listener) 153 135 { … … 332 314 } 333 315 334 void ScriptDebugServer::compileScript(JSC::ExecState*, const String&, const String&, String*, String*)335 {336 // FIXME(89652): implement this.337 }338 339 void ScriptDebugServer::clearCompiledScripts()340 {341 // FIXME(89652): implement this.342 }343 344 void ScriptDebugServer::runScript(JSC::ExecState*, const String&, Deprecated::ScriptValue*, bool*, String*)345 {346 // FIXME(89652): implement this.347 }348 349 316 } // namespace WebCore 350 317 -
trunk/Source/WebCore/bindings/js/ScriptDebugServer.h
r160682 r161691 60 60 void clearBreakpoints(); 61 61 62 bool canSetScriptSource();63 bool setScriptSource(const String& sourceID, const String& newContent, bool preview, String* error, Deprecated::ScriptValue* newCallFrames, Deprecated::ScriptObject* result);64 void updateCallStack(Deprecated::ScriptValue* callFrame);65 66 bool causesRecompilation() { return true; }67 bool supportsSeparateScriptCompilationAndExecution() { return false; }68 69 62 void recompileAllJSFunctionsSoon(); 70 63 virtual void recompileAllJSFunctions(Timer<ScriptDebugServer>* = 0) = 0; 71 64 72 void setScriptPreprocessor(const String&)73 {74 // FIXME(webkit.org/b/82203): Implement preprocessor.75 }76 77 65 bool runningNestedMessageLoop() { return m_runningNestedMessageLoop; } 78 79 void compileScript(JSC::ExecState*, const String& expression, const String& sourceURL, String* scriptID, String* exceptionMessage);80 void clearCompiledScripts();81 void runScript(JSC::ExecState*, const String& scriptID, Deprecated::ScriptValue* result, bool* wasThrown, String* exceptionMessage);82 66 83 67 class Task { -
trunk/Source/WebCore/bindings/js/ScriptProfiler.h
r161382 r161691 68 68 static PassRefPtr<ScriptProfile> stopForWorkerGlobalScope(WorkerGlobalScope*, const String& title); 69 69 static PassRefPtr<ScriptHeapSnapshot> takeHeapSnapshot(const String&, HeapSnapshotProgress*) { return 0; } 70 static bool causesRecompilation() { return true; }71 70 static bool isSampling() { return false; } 72 71 static bool hasHeapProfiler() { return false; } -
trunk/Source/WebCore/inspector/InspectorDebuggerAgent.cpp
r161563 r161691 96 96 stopListeningScriptDebugServer(); 97 97 scriptDebugServer().clearBreakpoints(); 98 scriptDebugServer().clearCompiledScripts();99 98 scriptDebugServer().continueProgram(); 100 99 clear(); … … 104 103 105 104 m_enabled = false; 106 }107 108 void InspectorDebuggerAgent::causesRecompilation(ErrorString*, bool* result)109 {110 *result = scriptDebugServer().causesRecompilation();111 }112 113 void InspectorDebuggerAgent::canSetScriptSource(ErrorString*, bool* result)114 {115 *result = scriptDebugServer().canSetScriptSource();116 }117 118 void InspectorDebuggerAgent::supportsSeparateScriptCompilationAndExecution(ErrorString*, bool* result)119 {120 *result = scriptDebugServer().supportsSeparateScriptCompilationAndExecution();121 105 } 122 106 … … 413 397 } 414 398 415 static PassRefPtr<InspectorObject> scriptToInspectorObject(Deprecated::ScriptObject scriptObject)416 {417 if (scriptObject.hasNoValue())418 return 0;419 RefPtr<InspectorValue> value = scriptObject.toInspectorValue(scriptObject.scriptState());420 if (!value)421 return 0;422 return value->asObject();423 }424 425 399 void InspectorDebuggerAgent::searchInContent(ErrorString* error, const String& scriptIDStr, const String& query, const bool* const optionalCaseSensitive, const bool* const optionalIsRegex, RefPtr<Array<Inspector::TypeBuilder::GenericTypes::SearchMatch>>& results) 426 400 { … … 434 408 else 435 409 *error = "No script for id: " + scriptIDStr; 436 }437 438 void InspectorDebuggerAgent::setScriptSource(ErrorString* error, const String& scriptID, const String& newContent, const bool* const preview, RefPtr<Array<Inspector::TypeBuilder::Debugger::CallFrame>>& newCallFrames, RefPtr<InspectorObject>& result)439 {440 bool previewOnly = preview && *preview;441 Deprecated::ScriptObject resultObject;442 if (!scriptDebugServer().setScriptSource(scriptID, newContent, previewOnly, error, &m_currentCallStack, &resultObject))443 return;444 newCallFrames = currentCallFrames();445 RefPtr<InspectorObject> object = scriptToInspectorObject(resultObject);446 if (object)447 result = object;448 410 } 449 411 … … 564 526 565 527 if (doNotPauseOnExceptionsAndMuteConsole ? *doNotPauseOnExceptionsAndMuteConsole : false) { 566 unmuteConsole();567 if (scriptDebugServer().pauseOnExceptionsState() != previousPauseOnExceptionsState)568 scriptDebugServer().setPauseOnExceptionsState(previousPauseOnExceptionsState);569 }570 }571 572 void InspectorDebuggerAgent::compileScript(ErrorString* errorString, const String& expression, const String& sourceURL, Inspector::TypeBuilder::OptOutput<ScriptId>* scriptID, Inspector::TypeBuilder::OptOutput<String>* syntaxErrorMessage)573 {574 InjectedScript injectedScript = injectedScriptForEval(errorString, 0);575 if (injectedScript.hasNoValue()) {576 *errorString = "Inspected frame has gone";577 return;578 }579 580 String scriptIDValue;581 String exceptionMessage;582 scriptDebugServer().compileScript(injectedScript.scriptState(), expression, sourceURL, &scriptIDValue, &exceptionMessage);583 if (!scriptIDValue && !exceptionMessage) {584 *errorString = "Script compilation failed";585 return;586 }587 *syntaxErrorMessage = exceptionMessage;588 *scriptID = scriptIDValue;589 }590 591 void InspectorDebuggerAgent::runScript(ErrorString* errorString, const ScriptId& scriptID, const int* executionContextId, const String* const objectGroup, const bool* const doNotPauseOnExceptionsAndMuteConsole, RefPtr<Inspector::TypeBuilder::Runtime::RemoteObject>& result, Inspector::TypeBuilder::OptOutput<bool>* wasThrown)592 {593 InjectedScript injectedScript = injectedScriptForEval(errorString, executionContextId);594 if (injectedScript.hasNoValue()) {595 *errorString = "Inspected frame has gone";596 return;597 }598 599 ScriptDebugServer::PauseOnExceptionsState previousPauseOnExceptionsState = scriptDebugServer().pauseOnExceptionsState();600 if (doNotPauseOnExceptionsAndMuteConsole && *doNotPauseOnExceptionsAndMuteConsole) {601 if (previousPauseOnExceptionsState != ScriptDebugServer::DontPauseOnExceptions)602 scriptDebugServer().setPauseOnExceptionsState(ScriptDebugServer::DontPauseOnExceptions);603 muteConsole();604 }605 606 Deprecated::ScriptValue value;607 bool wasThrownValue;608 String exceptionMessage;609 scriptDebugServer().runScript(injectedScript.scriptState(), scriptID, &value, &wasThrownValue, &exceptionMessage);610 *wasThrown = wasThrownValue;611 if (value.hasNoValue()) {612 *errorString = "Script execution failed";613 return;614 }615 result = injectedScript.wrapObject(value, objectGroup ? *objectGroup : "");616 if (wasThrownValue)617 result->setDescription(exceptionMessage);618 619 if (doNotPauseOnExceptionsAndMuteConsole && *doNotPauseOnExceptionsAndMuteConsole) {620 528 unmuteConsole(); 621 529 if (scriptDebugServer().pauseOnExceptionsState() != previousPauseOnExceptionsState) -
trunk/Source/WebCore/inspector/InspectorDebuggerAgent.h
r161563 r161691 71 71 virtual ~InspectorDebuggerAgent(); 72 72 73 virtual void causesRecompilation(ErrorString*, bool*);74 virtual void canSetScriptSource(ErrorString*, bool*);75 virtual void supportsSeparateScriptCompilationAndExecution(ErrorString*, bool*);76 77 73 virtual void didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel*, Inspector::InspectorBackendDispatcher*) OVERRIDE; 78 74 virtual void willDestroyFrontendAndBackend() OVERRIDE; … … 93 89 94 90 virtual void searchInContent(ErrorString*, const String& scriptID, const String& query, const bool* optionalCaseSensitive, const bool* optionalIsRegex, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::GenericTypes::SearchMatch>>&); 95 virtual void setScriptSource(ErrorString*, const String& scriptID, const String& newContent, const bool* preview, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Debugger::CallFrame>>& newCallFrames, RefPtr<Inspector::InspectorObject>& result);96 91 virtual void getScriptSource(ErrorString*, const String& scriptID, String* scriptSource); 97 92 virtual void getFunctionDetails(ErrorString*, const String& functionId, RefPtr<Inspector::TypeBuilder::Debugger::FunctionDetails>&); … … 112 107 RefPtr<Inspector::TypeBuilder::Runtime::RemoteObject>& result, 113 108 Inspector::TypeBuilder::OptOutput<bool>* wasThrown); 114 void compileScript(ErrorString*, const String& expression, const String& sourceURL, Inspector::TypeBuilder::OptOutput<Inspector::TypeBuilder::Debugger::ScriptId>*, Inspector::TypeBuilder::OptOutput<String>* syntaxErrorMessage);115 void runScript(ErrorString*, const Inspector::TypeBuilder::Debugger::ScriptId&, const int* executionContextId, const String* objectGroup, const bool* doNotPauseOnExceptionsAndMuteConsole, RefPtr<Inspector::TypeBuilder::Runtime::RemoteObject>& result, Inspector::TypeBuilder::OptOutput<bool>* wasThrown);116 109 virtual void setOverlayMessage(ErrorString*, const String*); 117 110 -
trunk/Source/WebCore/inspector/InspectorPageAgent.cpp
r161633 r161691 427 427 } 428 428 429 void InspectorPageAgent::reload(ErrorString*, const bool* const optionalIgnoreCache, const String* optionalScriptToEvaluateOnLoad , const String* optionalScriptPreprocessor)429 void InspectorPageAgent::reload(ErrorString*, const bool* const optionalIgnoreCache, const String* optionalScriptToEvaluateOnLoad) 430 430 { 431 431 m_pendingScriptToEvaluateOnLoadOnce = optionalScriptToEvaluateOnLoad ? *optionalScriptToEvaluateOnLoad : ""; 432 m_pendingScriptPreprocessor = optionalScriptPreprocessor ? *optionalScriptPreprocessor : "";433 432 m_page->mainFrame().loader().reload(optionalIgnoreCache ? *optionalIgnoreCache : false); 434 433 } … … 785 784 if (loader->frame()->isMainFrame()) { 786 785 m_scriptToEvaluateOnLoadOnce = m_pendingScriptToEvaluateOnLoadOnce; 787 m_scriptPreprocessor = m_pendingScriptPreprocessor;788 786 m_pendingScriptToEvaluateOnLoadOnce = String(); 789 m_pendingScriptPreprocessor = String();790 787 } 791 788 m_frontendDispatcher->frameNavigated(buildObjectForFrame(loader->frame())); -
trunk/Source/WebCore/inspector/InspectorPageAgent.h
r161633 r161691 100 100 virtual void addScriptToEvaluateOnLoad(ErrorString*, const String& source, String* result); 101 101 virtual void removeScriptToEvaluateOnLoad(ErrorString*, const String& identifier); 102 virtual void reload(ErrorString*, const bool* optionalIgnoreCache, const String* optionalScriptToEvaluateOnLoad , const String* optionalScriptPreprocessor);102 virtual void reload(ErrorString*, const bool* optionalIgnoreCache, const String* optionalScriptToEvaluateOnLoad); 103 103 virtual void navigate(ErrorString*, const String& url); 104 104 virtual void getCookies(ErrorString*, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Page::Cookie>>& cookies); … … 161 161 Frame* findFrameWithSecurityOrigin(const String& originRawString); 162 162 Frame* assertFrame(ErrorString*, const String& frameId); 163 String scriptPreprocessor() { return m_scriptPreprocessor; }164 163 static DocumentLoader* assertDocumentLoader(ErrorString*, Frame*); 165 164 … … 183 182 String m_pendingScriptToEvaluateOnLoadOnce; 184 183 String m_scriptToEvaluateOnLoadOnce; 185 String m_pendingScriptPreprocessor;186 String m_scriptPreprocessor;187 184 HashMap<Frame*, String> m_frameToIdentifier; 188 185 HashMap<String, Frame*> m_identifierToFrame; -
trunk/Source/WebCore/inspector/InspectorProfilerAgent.cpp
r161563 r161691 191 191 } 192 192 193 void InspectorProfilerAgent::causesRecompilation(ErrorString*, bool* result)194 {195 *result = ScriptProfiler::causesRecompilation();196 }197 198 193 void InspectorProfilerAgent::isSampling(ErrorString*, bool* result) 199 194 { -
trunk/Source/WebCore/inspector/InspectorProfilerAgent.h
r161563 r161691 74 74 void resetState(); 75 75 76 virtual void causesRecompilation(ErrorString*, bool*);77 76 virtual void recompileScript() = 0; 78 77 virtual void isSampling(ErrorString*, bool*); -
trunk/Source/WebCore/inspector/PageDebuggerAgent.cpp
r161563 r161691 122 122 { 123 123 reset(); 124 scriptDebugServer().setScriptPreprocessor(m_pageAgent->scriptPreprocessor());125 124 } 126 125 -
trunk/Source/WebCore/inspector/protocol/Page.json
r161556 r161691 112 112 "parameters": [ 113 113 { "name": "ignoreCache", "type": "boolean", "optional": true, "description": "If true, browser cache is ignored (as if the user pressed Shift+refresh)." }, 114 { "name": "scriptToEvaluateOnLoad", "type": "string", "optional": true, "description": "If set, the script will be injected into all frames of the inspected page after reload." }, 115 { "name": "scriptPreprocessor", "type": "string", "optional": true, "description": "Script body that should evaluate to function that will preprocess all the scripts before their compilation." } 114 { "name": "scriptToEvaluateOnLoad", "type": "string", "optional": true, "description": "If set, the script will be injected into all frames of the inspected page after reload." } 116 115 ], 117 116 "description": "Reloads given page optionally ignoring the cache." -
trunk/Source/WebCore/inspector/protocol/Profiler.json
r159233 r161691 47 47 ], 48 48 "commands": [ 49 {50 "name": "causesRecompilation",51 "returns": [52 { "name": "result", "type": "boolean" }53 ]54 },55 49 { 56 50 "name": "isSampling", -
trunk/Source/WebInspectorUI/ChangeLog
r161689 r161691 1 2014-01-10 Joseph Pecoraro <pecoraro@apple.com> 2 3 Web Inspector: Remove unimplemented or static ScriptDebugServer features 4 https://bugs.webkit.org/show_bug.cgi?id=126784 5 6 Reviewed by Timothy Hatcher. 7 8 * UserInterface/InspectorJSBackendCommands.js: 9 * UserInterface/InspectorWebBackendCommands.js: 10 * UserInterface/Legacy/6.0/InspectorWebBackendCommands.js: 11 * UserInterface/Legacy/7.0/InspectorWebBackendCommands.js: 12 * Versions/Inspector-iOS-6.0.json: 13 * Versions/Inspector-iOS-7.0.json: 14 1 15 2014-01-10 Timothy Hatcher <timothy@apple.com> 2 16 -
trunk/Source/WebInspectorUI/UserInterface/InspectorJSBackendCommands.js
r160588 r161691 17 17 InspectorBackend.registerEvent("Debugger.paused", ["callFrames", "reason", "data"]); 18 18 InspectorBackend.registerEvent("Debugger.resumed", []); 19 InspectorBackend.registerCommand("Debugger.causesRecompilation", [], ["result"]);20 InspectorBackend.registerCommand("Debugger.supportsSeparateScriptCompilationAndExecution", [], ["result"]);21 19 InspectorBackend.registerCommand("Debugger.enable", [], []); 22 20 InspectorBackend.registerCommand("Debugger.disable", [], []); … … 32 30 InspectorBackend.registerCommand("Debugger.resume", [], []); 33 31 InspectorBackend.registerCommand("Debugger.searchInContent", [{"name": "scriptId", "type": "string", "optional": false}, {"name": "query", "type": "string", "optional": false}, {"name": "caseSensitive", "type": "boolean", "optional": true}, {"name": "isRegex", "type": "boolean", "optional": true}], ["result"]); 34 InspectorBackend.registerCommand("Debugger.canSetScriptSource", [], ["result"]);35 InspectorBackend.registerCommand("Debugger.setScriptSource", [{"name": "scriptId", "type": "string", "optional": false}, {"name": "scriptSource", "type": "string", "optional": false}, {"name": "preview", "type": "boolean", "optional": true}], ["callFrames", "result"]);36 32 InspectorBackend.registerCommand("Debugger.getScriptSource", [{"name": "scriptId", "type": "string", "optional": false}], ["scriptSource"]); 37 33 InspectorBackend.registerCommand("Debugger.getFunctionDetails", [{"name": "functionId", "type": "string", "optional": false}], ["details"]); 38 34 InspectorBackend.registerCommand("Debugger.setPauseOnExceptions", [{"name": "state", "type": "string", "optional": false}], []); 39 35 InspectorBackend.registerCommand("Debugger.evaluateOnCallFrame", [{"name": "callFrameId", "type": "string", "optional": false}, {"name": "expression", "type": "string", "optional": false}, {"name": "objectGroup", "type": "string", "optional": true}, {"name": "includeCommandLineAPI", "type": "boolean", "optional": true}, {"name": "doNotPauseOnExceptionsAndMuteConsole", "type": "boolean", "optional": true}, {"name": "returnByValue", "type": "boolean", "optional": true}, {"name": "generatePreview", "type": "boolean", "optional": true}], ["result", "wasThrown"]); 40 InspectorBackend.registerCommand("Debugger.compileScript", [{"name": "expression", "type": "string", "optional": false}, {"name": "sourceURL", "type": "string", "optional": false}], ["scriptId", "syntaxErrorMessage"]);41 InspectorBackend.registerCommand("Debugger.runScript", [{"name": "scriptId", "type": "string", "optional": false}, {"name": "contextId", "type": "number", "optional": true}, {"name": "objectGroup", "type": "string", "optional": true}, {"name": "doNotPauseOnExceptionsAndMuteConsole", "type": "boolean", "optional": true}], ["result", "wasThrown"]);42 36 InspectorBackend.registerCommand("Debugger.setOverlayMessage", [{"name": "message", "type": "string", "optional": true}], []); 43 37 -
trunk/Source/WebInspectorUI/UserInterface/InspectorWebBackendCommands.js
r161556 r161691 251 251 InspectorBackend.registerCommand("Page.addScriptToEvaluateOnLoad", [{"name": "scriptSource", "type": "string", "optional": false}], ["identifier"]); 252 252 InspectorBackend.registerCommand("Page.removeScriptToEvaluateOnLoad", [{"name": "identifier", "type": "string", "optional": false}], []); 253 InspectorBackend.registerCommand("Page.reload", [{"name": "ignoreCache", "type": "boolean", "optional": true}, {"name": "scriptToEvaluateOnLoad", "type": "string", "optional": true} , {"name": "scriptPreprocessor", "type": "string", "optional": true}], []);253 InspectorBackend.registerCommand("Page.reload", [{"name": "ignoreCache", "type": "boolean", "optional": true}, {"name": "scriptToEvaluateOnLoad", "type": "string", "optional": true}], []); 254 254 InspectorBackend.registerCommand("Page.navigate", [{"name": "url", "type": "string", "optional": false}], []); 255 255 InspectorBackend.registerCommand("Page.getCookies", [], ["cookies"]); … … 287 287 InspectorBackend.registerEvent("Profiler.resetProfiles", []); 288 288 InspectorBackend.registerEvent("Profiler.reportHeapSnapshotProgress", ["done", "total"]); 289 InspectorBackend.registerCommand("Profiler.causesRecompilation", [], ["result"]);290 289 InspectorBackend.registerCommand("Profiler.isSampling", [], ["result"]); 291 290 InspectorBackend.registerCommand("Profiler.hasHeapProfiler", [], ["result"]); -
trunk/Source/WebInspectorUI/UserInterface/Legacy/6.0/InspectorWebBackendCommands.js
r161556 r161691 224 224 InspectorBackend.registerEvent("Debugger.paused", ["callFrames", "reason", "data"]); 225 225 InspectorBackend.registerEvent("Debugger.resumed", []); 226 InspectorBackend.registerCommand("Debugger.causesRecompilation", [], ["result"]);227 226 InspectorBackend.registerCommand("Debugger.supportsNativeBreakpoints", [], ["result"]); 228 227 InspectorBackend.registerCommand("Debugger.enable", [], []); … … 239 238 InspectorBackend.registerCommand("Debugger.resume", [], []); 240 239 InspectorBackend.registerCommand("Debugger.searchInContent", [{"name": "scriptId", "type": "string", "optional": false}, {"name": "query", "type": "string", "optional": false}, {"name": "caseSensitive", "type": "boolean", "optional": true}, {"name": "isRegex", "type": "boolean", "optional": true}], ["result"]); 241 InspectorBackend.registerCommand("Debugger.canSetScriptSource", [], ["result"]);242 InspectorBackend.registerCommand("Debugger.setScriptSource", [{"name": "scriptId", "type": "string", "optional": false}, {"name": "scriptSource", "type": "string", "optional": false}, {"name": "preview", "type": "boolean", "optional": true}], ["callFrames", "result"]);243 240 InspectorBackend.registerCommand("Debugger.getScriptSource", [{"name": "scriptId", "type": "string", "optional": false}], ["scriptSource"]); 244 241 InspectorBackend.registerCommand("Debugger.getFunctionDetails", [{"name": "functionId", "type": "string", "optional": false}], ["details"]); … … 266 263 InspectorBackend.registerEvent("Profiler.resetProfiles", []); 267 264 InspectorBackend.registerEvent("Profiler.reportHeapSnapshotProgress", ["done", "total"]); 268 InspectorBackend.registerCommand("Profiler.causesRecompilation", [], ["result"]);269 265 InspectorBackend.registerCommand("Profiler.isSampling", [], ["result"]); 270 266 InspectorBackend.registerCommand("Profiler.hasHeapProfiler", [], ["result"]); -
trunk/Source/WebInspectorUI/UserInterface/Legacy/7.0/InspectorWebBackendCommands.js
r161556 r161691 260 260 InspectorBackend.registerEvent("Debugger.paused", ["callFrames", "reason", "data"]); 261 261 InspectorBackend.registerEvent("Debugger.resumed", []); 262 InspectorBackend.registerCommand("Debugger.causesRecompilation", [], ["result"]);263 InspectorBackend.registerCommand("Debugger.supportsSeparateScriptCompilationAndExecution", [], ["result"]);264 262 InspectorBackend.registerCommand("Debugger.enable", [], []); 265 263 InspectorBackend.registerCommand("Debugger.disable", [], []); … … 275 273 InspectorBackend.registerCommand("Debugger.resume", [], []); 276 274 InspectorBackend.registerCommand("Debugger.searchInContent", [{"name": "scriptId", "type": "string", "optional": false}, {"name": "query", "type": "string", "optional": false}, {"name": "caseSensitive", "type": "boolean", "optional": true}, {"name": "isRegex", "type": "boolean", "optional": true}], ["result"]); 277 InspectorBackend.registerCommand("Debugger.canSetScriptSource", [], ["result"]);278 InspectorBackend.registerCommand("Debugger.setScriptSource", [{"name": "scriptId", "type": "string", "optional": false}, {"name": "scriptSource", "type": "string", "optional": false}, {"name": "preview", "type": "boolean", "optional": true}], ["callFrames", "result"]);279 275 InspectorBackend.registerCommand("Debugger.restartFrame", [{"name": "callFrameId", "type": "string", "optional": false}], ["callFrames", "result"]); 280 276 InspectorBackend.registerCommand("Debugger.getScriptSource", [{"name": "scriptId", "type": "string", "optional": false}], ["scriptSource"]); … … 282 278 InspectorBackend.registerCommand("Debugger.setPauseOnExceptions", [{"name": "state", "type": "string", "optional": false}], []); 283 279 InspectorBackend.registerCommand("Debugger.evaluateOnCallFrame", [{"name": "callFrameId", "type": "string", "optional": false}, {"name": "expression", "type": "string", "optional": false}, {"name": "objectGroup", "type": "string", "optional": true}, {"name": "includeCommandLineAPI", "type": "boolean", "optional": true}, {"name": "doNotPauseOnExceptionsAndMuteConsole", "type": "boolean", "optional": true}, {"name": "returnByValue", "type": "boolean", "optional": true}, {"name": "generatePreview", "type": "boolean", "optional": true}], ["result", "wasThrown"]); 284 InspectorBackend.registerCommand("Debugger.compileScript", [{"name": "expression", "type": "string", "optional": false}, {"name": "sourceURL", "type": "string", "optional": false}], ["scriptId", "syntaxErrorMessage"]);285 InspectorBackend.registerCommand("Debugger.runScript", [{"name": "scriptId", "type": "string", "optional": false}, {"name": "contextId", "type": "number", "optional": true}, {"name": "objectGroup", "type": "string", "optional": true}, {"name": "doNotPauseOnExceptionsAndMuteConsole", "type": "boolean", "optional": true}], ["result", "wasThrown"]);286 280 InspectorBackend.registerCommand("Debugger.setOverlayMessage", [{"name": "message", "type": "string", "optional": true}], []); 287 281 InspectorBackend.registerCommand("Debugger.setVariableValue", [{"name": "scopeNumber", "type": "number", "optional": false}, {"name": "variableName", "type": "string", "optional": false}, {"name": "newValue", "type": "object", "optional": false}, {"name": "callFrameId", "type": "string", "optional": true}, {"name": "functionObjectId", "type": "string", "optional": true}], []); … … 307 301 InspectorBackend.registerEvent("Profiler.resetProfiles", []); 308 302 InspectorBackend.registerEvent("Profiler.reportHeapSnapshotProgress", ["done", "total"]); 309 InspectorBackend.registerCommand("Profiler.causesRecompilation", [], ["result"]);310 303 InspectorBackend.registerCommand("Profiler.isSampling", [], ["result"]); 311 304 InspectorBackend.registerCommand("Profiler.hasHeapProfiler", [], ["result"]); -
trunk/Source/WebInspectorUI/Versions/Inspector-iOS-6.0.json
r161556 r161691 2197 2197 "commands": [ 2198 2198 { 2199 "name": "causesRecompilation",2200 "returns": [2201 { "name": "result", "type": "boolean", "description": "True if enabling debugger causes scripts recompilation." }2202 ],2203 "hidden": true,2204 "description": "Tells whether enabling debugger causes scripts recompilation."2205 },2206 {2207 2199 "name": "supportsNativeBreakpoints", 2208 2200 "returns": [ … … 2300 2292 ], 2301 2293 "description": "Searches for given string in script content." 2302 },2303 {2304 "name": "canSetScriptSource",2305 "returns": [2306 { "name": "result", "type": "boolean", "description": "True if <code>setScriptSource</code> is supported." }2307 ],2308 "description": "Tells whether <code>setScriptSource</code> is supported."2309 },2310 {2311 "name": "setScriptSource",2312 "parameters": [2313 { "name": "scriptId", "$ref": "ScriptId", "description": "Id of the script to edit." },2314 { "name": "scriptSource", "type": "string", "description": "New content of the script." },2315 { "name": "preview", "type": "boolean", "optional": true, "description": " If true the change will not actually be applied. Preview mode may be used to get result description without actually modifying the code.", "hidden": true }2316 ],2317 "returns": [2318 { "name": "callFrames", "type": "array", "optional": true, "items": { "$ref": "CallFrame"}, "description": "New stack trace in case editing has happened while VM was stopped." },2319 { "name": "result", "type": "object", "optional": true, "description": "VM-specific description of the changes applied.", "hidden": true }2320 ],2321 "description": "Edits JavaScript source live."2322 2294 }, 2323 2295 { … … 2520 2492 "commands": [ 2521 2493 { 2522 "name": "causesRecompilation",2523 "returns": [2524 { "name": "result", "type": "boolean" }2525 ]2526 },2527 {2528 2494 "name": "isSampling", 2529 2495 "returns": [ -
trunk/Source/WebInspectorUI/Versions/Inspector-iOS-7.0.json
r161556 r161691 2516 2516 "commands": [ 2517 2517 { 2518 "name": "causesRecompilation",2519 "returns": [2520 { "name": "result", "type": "boolean", "description": "True if enabling debugger causes scripts recompilation." }2521 ],2522 "description": "Tells whether enabling debugger causes scripts recompilation."2523 },2524 {2525 "name": "supportsSeparateScriptCompilationAndExecution",2526 "returns": [2527 { "name": "result", "type": "boolean", "description": "True if debugger supports separate script compilation and execution." }2528 ],2529 "description": "Tells whether debugger supports separate script compilation and execution."2530 },2531 {2532 2518 "name": "enable", 2533 2519 "description": "Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received." … … 2617 2603 ], 2618 2604 "description": "Searches for given string in script content." 2619 },2620 {2621 "name": "canSetScriptSource",2622 "returns": [2623 { "name": "result", "type": "boolean", "description": "True if <code>setScriptSource</code> is supported." }2624 ],2625 "description": "Tells whether <code>setScriptSource</code> is supported."2626 },2627 {2628 "name": "setScriptSource",2629 "parameters": [2630 { "name": "scriptId", "$ref": "ScriptId", "description": "Id of the script to edit." },2631 { "name": "scriptSource", "type": "string", "description": "New content of the script." },2632 { "name": "preview", "type": "boolean", "optional": true, "description": " If true the change will not actually be applied. Preview mode may be used to get result description without actually modifying the code." }2633 ],2634 "returns": [2635 { "name": "callFrames", "type": "array", "optional": true, "items": { "$ref": "CallFrame"}, "description": "New stack trace in case editing has happened while VM was stopped." },2636 { "name": "result", "type": "object", "optional": true, "description": "VM-specific description of the changes applied." }2637 ],2638 "description": "Edits JavaScript source live."2639 2605 }, 2640 2606 { … … 2692 2658 ], 2693 2659 "description": "Evaluates expression on a given call frame." 2694 },2695 {2696 "name": "compileScript",2697 "parameters": [2698 { "name": "expression", "type": "string", "description": "Expression to compile." },2699 { "name": "sourceURL", "type": "string", "description": "Source url to be set for the script." }2700 ],2701 "returns": [2702 { "name": "scriptId", "$ref": "ScriptId", "optional": true, "description": "Id of the script." },2703 { "name": "syntaxErrorMessage", "type": "string", "optional": true, "description": "Syntax error message if compilation failed." }2704 ],2705 "description": "Compiles expression."2706 },2707 {2708 "name": "runScript",2709 "parameters": [2710 { "name": "scriptId", "$ref": "ScriptId", "description": "Id of the script to run." },2711 { "name": "contextId", "$ref": "Runtime.ExecutionContextId", "optional": true, "description": "Specifies in which isolated context to perform script run. Each content script lives in an isolated context and this parameter may be used to specify one of those contexts. If the parameter is omitted or 0 the evaluation will be performed in the context of the inspected page." },2712 { "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name that can be used to release multiple objects." },2713 { "name": "doNotPauseOnExceptionsAndMuteConsole", "type": "boolean", "optional": true, "description": "Specifies whether script run should stop on exceptions and mute console. Overrides setPauseOnException state." }2714 ],2715 "returns": [2716 { "name": "result", "$ref": "Runtime.RemoteObject", "description": "Run result." },2717 { "name": "wasThrown", "type": "boolean", "optional": true, "description": "True if the result was thrown during the script run." }2718 ],2719 "description": "Runs script with given id in a given context."2720 2660 }, 2721 2661 { … … 2912 2852 ], 2913 2853 "commands": [ 2914 {2915 "name": "causesRecompilation",2916 "returns": [2917 { "name": "result", "type": "boolean" }2918 ]2919 },2920 2854 { 2921 2855 "name": "isSampling",
Note: See TracChangeset
for help on using the changeset viewer.