WebKit Bugzilla
Attachment 358380 Details for
Bug 193149
: Web Inspector: Audit: create new IDL type for exposing special functionality in test context
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-193149-20190104161900.patch (text/plain), 112.11 KB, created by
Devin Rousso
on 2019-01-04 15:19:01 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Devin Rousso
Created:
2019-01-04 15:19:01 PST
Size:
112.11 KB
patch
obsolete
>diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog >index ef46089a850bdc2a4206b553d0b522e5b16d5ed7..a4434059a650a322810067fe83d68468c42d6c44 100644 >--- a/Source/JavaScriptCore/ChangeLog >+++ b/Source/JavaScriptCore/ChangeLog >@@ -1,3 +1,61 @@ >+2019-01-04 Devin Rousso <drousso@apple.com> >+ >+ Web Inspector: Audit: create new IDL type for exposing special functionality in test context >+ https://bugs.webkit.org/show_bug.cgi?id=193149 >+ <rdar://problem/46801218> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Create a new `AuditAgent` (and various subclasses for different inspection targets) >+ >+ * inspector/protocol/Audit.json: Added. >+ Add a `run` command that is a simpler version of `Runtime.evaluate`, except that it expects >+ a function string instead of an arbitrary JavaScript expression. >+ >+ * inspector/agents/InspectorAuditAgent.h: Added. >+ * inspector/agents/InspectorAuditAgent.cpp: Added. >+ (Inspector::InspectorAuditAgent::InspectorAuditAgent): >+ (Inspector::InspectorAuditAgent::didCreateFrontendAndBackend): >+ (Inspector::InspectorAuditAgent::willDestroyFrontendAndBackend): >+ (Inspector::InspectorAuditAgent::run): >+ (Inspector::InspectorAuditAgent::runArguments): >+ >+ * inspector/agents/JSGlobalObjectAuditAgent.h: Added. >+ * inspector/agents/JSGlobalObjectAuditAgent.cpp: Added. >+ (Inspector::JSGlobalObjectAuditAgent::JSGlobalObjectAuditAgent): >+ (Inspector::JSGlobalObjectAuditAgent::injectedScriptForEval): >+ >+ * inspector/JSGlobalObjectInspectorController.h: >+ * inspector/JSGlobalObjectInspectorController.cpp: >+ (Inspector::JSGlobalObjectInspectorController::JSGlobalObjectInspectorController): >+ (Inspector::JSGlobalObjectInspectorController::connectFrontend): >+ (Inspector::JSGlobalObjectInspectorController::jsAgentContext): Added. >+ (Inspector::JSGlobalObjectInspectorController::createLazyAgents): Added. >+ >+ * inspector/InjectedScript.h: >+ * inspector/InjectedScript.cpp: >+ (Inspector::InjectedScript::execute): Added. >+ (Inspector::InjectedScript::arrayFromVector): Added. >+ Create a version of `evaluate` that accepts a list of arguemnts to be passed in as arguments >+ to the function that was created by the `eval` of the given `functionString`. >+ >+ * inspector/InjectedScriptSource.js: >+ (InjectedScript.prototype.execute): Added. >+ (InjectedScript.prototype.evaluate): >+ (InjectedScript.prototype.evaluateOnCallFrame): >+ (InjectedScript.prototype._evaluateAndWrap): >+ (InjectedScript.prototype._wrapAndSaveCall): Added. >+ (InjectedScript.prototype._wrapCall): Added. >+ (InjectedScript.prototype._evaluateOn): >+ Refactor the `eval` and `saveResult` logic to allow for more flexibility for other callers. >+ >+ * CMakeLists.txt: >+ * DerivedSources-input.xcfilelist: >+ * DerivedSources.make: >+ * JavaScriptCore.xcodeproj/project.pbxproj: >+ * Sources.txt: >+ * UnifiedSources-input.xcfilelist: >+ > 2019-01-04 Tadeu Zagallo <tzagallo@apple.com> > > Baseline version of get_by_id may corrupt metadata >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 7b30489104eecef630bacfe1e9d6f40d35208b38..1004465d2b2e241a073a8f30f6cfd888addb4672 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,50 @@ >+2019-01-04 Devin Rousso <drousso@apple.com> >+ >+ Web Inspector: Audit: create new IDL type for exposing special functionality in test context >+ https://bugs.webkit.org/show_bug.cgi?id=193149 >+ <rdar://problem/46801218> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Test: inspector/audit/run.html >+ >+ Create a new `AuditAgent` (and various subclasses for different inspection targets), as well >+ as a `InspectorAuditUtilities` object that will be injected into the test function to allow >+ for more advanced testing. >+ >+ * inspector/InspectorAuditUtilities.h: Added. >+ (WebCore::InspectorAuditUtilities::create): >+ * inspector/InspectorAuditUtilities.cpp: Added. >+ (WebCore::InspectorAuditUtilities::InspectorAuditUtilities): >+ * inspector/InspectorAuditUtilities.idl: Added. >+ >+ * inspector/agents/page/PageAuditAgent.h: Added. >+ * inspector/agents/page/PageAuditAgent.cpp: Added. >+ (WebCore::PageAuditAgent::PageAuditAgent): >+ (WebCore::PageAuditAgent::injectedScriptForEval): >+ (WebCore::PageAuditAgent::runArguments): >+ (WebCore::PageAuditAgent::muteConsole): >+ (WebCore::PageAuditAgent::unmuteConsole): >+ >+ * inspector/agents/worker/WorkerAuditAgent.h: Added. >+ * inspector/agents/worker/WorkerAuditAgent.cpp: Added. >+ (WebCore::WorkerAuditAgent::WorkerAuditAgent): >+ (WebCore::WorkerAuditAgent::injectedScriptForEval): >+ >+ * inspector/InspectorController.cpp: >+ (WebCore::InspectorController::createLazyAgents): >+ >+ * inspector/WorkerInspectorController.cpp: >+ (WebCore::WorkerInspectorController::createLazyAgents): >+ >+ * CMakeLists.txt: >+ * DerivedSources-input.xcfilelist: >+ * DerivedSources-output.xcfilelist: >+ * DerivedSources.make: >+ * Sources.txt: >+ * UnifiedSources-input.xcfilelist: >+ * WebCore.xcodeproj/project.pbxproj: >+ > 2019-01-04 Wenson Hsieh <wenson_hsieh@apple.com> > > [Cocoa] Merge WebEditCommandProxy::nameForEditAction and undoNameForEditAction into a single function >diff --git a/Source/WebInspectorUI/ChangeLog b/Source/WebInspectorUI/ChangeLog >index 55d4eff45f3faedb551d8ae52c154c6ea39c1149..f063fb694048c995730a626258cd7917fd364da9 100644 >--- a/Source/WebInspectorUI/ChangeLog >+++ b/Source/WebInspectorUI/ChangeLog >@@ -1,3 +1,21 @@ >+2019-01-04 Devin Rousso <drousso@apple.com> >+ >+ Web Inspector: Audit: create new IDL type for exposing special functionality in test context >+ https://bugs.webkit.org/show_bug.cgi?id=193149 >+ <rdar://problem/46801218> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Add `AuditAgent` getters and plumbing. >+ >+ * UserInterface/Protocol/Target.js: >+ (WI.Target.prototype.get AuditAgent): Added. >+ >+ * UserInterface/Models/AuditTestCase.js: >+ (WI.AuditTestCase.prototype.async run): >+ >+ * .eslintrc: >+ > 2019-01-04 Joseph Pecoraro <pecoraro@apple.com> > > Web Inspector: Include `globalThis` in default JavaScript completions >diff --git a/Source/JavaScriptCore/CMakeLists.txt b/Source/JavaScriptCore/CMakeLists.txt >index 79cab0b978bb9c8ebcdcc64ce2c93b09c34953c5..555ac6cabf8f6ed202394ea58c24b03bd512885f 100644 >--- a/Source/JavaScriptCore/CMakeLists.txt >+++ b/Source/JavaScriptCore/CMakeLists.txt >@@ -634,6 +634,7 @@ set(JavaScriptCore_PRIVATE_FRAMEWORK_HEADERS > inspector/ScriptDebugServer.h > > inspector/agents/InspectorAgent.h >+ inspector/agents/InspectorAuditAgent.h > inspector/agents/InspectorConsoleAgent.h > inspector/agents/InspectorDebuggerAgent.h > inspector/agents/InspectorHeapAgent.h >@@ -1063,6 +1064,7 @@ set(JavaScriptCore_INSPECTOR_PROTOCOL_SCRIPTS > > set(JavaScriptCore_INSPECTOR_DOMAINS > ${JAVASCRIPTCORE_DIR}/inspector/protocol/ApplicationCache.json >+ ${JAVASCRIPTCORE_DIR}/inspector/protocol/Audit.json > ${JAVASCRIPTCORE_DIR}/inspector/protocol/CSS.json > ${JAVASCRIPTCORE_DIR}/inspector/protocol/Canvas.json > ${JAVASCRIPTCORE_DIR}/inspector/protocol/Console.json >diff --git a/Source/JavaScriptCore/DerivedSources-input.xcfilelist b/Source/JavaScriptCore/DerivedSources-input.xcfilelist >index 583b1935c547e948e1b8ac78e23e4727af6dda79..20e86fdf50858e604e96e5099563cebb22388184 100644 >--- a/Source/JavaScriptCore/DerivedSources-input.xcfilelist >+++ b/Source/JavaScriptCore/DerivedSources-input.xcfilelist >@@ -76,6 +76,7 @@ $(PROJECT_DIR)/generator/Type.rb > $(PROJECT_DIR)/generator/main.rb > $(PROJECT_DIR)/inspector/InjectedScriptSource.js > $(PROJECT_DIR)/inspector/protocol/ApplicationCache.json >+$(PROJECT_DIR)/inspector/protocol/Audit.json > $(PROJECT_DIR)/inspector/protocol/CSS.json > $(PROJECT_DIR)/inspector/protocol/Canvas.json > $(PROJECT_DIR)/inspector/protocol/Console.json >diff --git a/Source/JavaScriptCore/DerivedSources.make b/Source/JavaScriptCore/DerivedSources.make >index f8435aec78c28d2ce4dafc5ee241771aa6706af8..47d25172e8e5384503ed5c55a8a4d8a2868319b2 100644 >--- a/Source/JavaScriptCore/DerivedSources.make >+++ b/Source/JavaScriptCore/DerivedSources.make >@@ -227,6 +227,7 @@ $(BYTECODE_FILES_PATTERNS): $(wildcard $(JavaScriptCore)/generator/*.rb) $(JavaS > > INSPECTOR_DOMAINS := \ > $(JavaScriptCore)/inspector/protocol/ApplicationCache.json \ >+ $(JavaScriptCore)/inspector/protocol/Audit.json \ > $(JavaScriptCore)/inspector/protocol/CSS.json \ > $(JavaScriptCore)/inspector/protocol/Canvas.json \ > $(JavaScriptCore)/inspector/protocol/Console.json \ >diff --git a/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj b/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj >index 02c352f10a27082f58e338d96e5b2ec55e709f66..dec03082c48144177b66babf863971ad1e1e58e1 100644 >--- a/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj >+++ b/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj >@@ -1243,6 +1243,8 @@ > 8BC064961E1D845C00B2B8CA /* AsyncIteratorPrototype.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BC064941E1D828B00B2B8CA /* AsyncIteratorPrototype.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 90213E3E123A40C200D422F3 /* MemoryStatistics.h in Headers */ = {isa = PBXBuildFile; fileRef = 90213E3C123A40C200D422F3 /* MemoryStatistics.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 9064337DD4B0402BAF34A592 /* JSScriptFetcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 6BA93C9590484C5BAD9316EA /* JSScriptFetcher.h */; settings = {ATTRIBUTES = (Private, ); }; }; >+ 91278D5521DEB82600B57184 /* InspectorAuditAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = 91278D5321DEB82500B57184 /* InspectorAuditAgent.h */; settings = {ATTRIBUTES = (Private, ); }; }; >+ 91278D5821DEDA9600B57184 /* JSGlobalObjectAuditAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = 91278D5621DEDA9400B57184 /* JSGlobalObjectAuditAgent.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 93052C350FB792190048FDC3 /* ParserArena.h in Headers */ = {isa = PBXBuildFile; fileRef = 93052C330FB792190048FDC3 /* ParserArena.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 932F5BD30822A1C700736975 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6560A4CF04B3B3E7008AE952 /* CoreFoundation.framework */; }; > 932F5BD60822A1C700736975 /* libobjc.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 51F0EC0705C86C9A00E6DF1B /* libobjc.dylib */; }; >@@ -3933,6 +3935,10 @@ > 8BC064951E1D838B00B2B8CA /* AsyncIteratorPrototype.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = AsyncIteratorPrototype.js; sourceTree = "<group>"; }; > 90213E3B123A40C200D422F3 /* MemoryStatistics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MemoryStatistics.cpp; sourceTree = "<group>"; }; > 90213E3C123A40C200D422F3 /* MemoryStatistics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MemoryStatistics.h; sourceTree = "<group>"; }; >+ 91278D5221DEB82400B57184 /* InspectorAuditAgent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorAuditAgent.cpp; sourceTree = "<group>"; }; >+ 91278D5321DEB82500B57184 /* InspectorAuditAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorAuditAgent.h; sourceTree = "<group>"; }; >+ 91278D5621DEDA9400B57184 /* JSGlobalObjectAuditAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSGlobalObjectAuditAgent.h; sourceTree = "<group>"; }; >+ 91278D5721DEDA9500B57184 /* JSGlobalObjectAuditAgent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSGlobalObjectAuditAgent.cpp; sourceTree = "<group>"; }; > 93052C320FB792190048FDC3 /* ParserArena.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ParserArena.cpp; sourceTree = "<group>"; }; > 93052C330FB792190048FDC3 /* ParserArena.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ParserArena.h; sourceTree = "<group>"; }; > 930DAD030FB1EB1A0082D205 /* NodeConstructors.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NodeConstructors.h; sourceTree = "<group>"; }; >@@ -7939,6 +7945,8 @@ > children = ( > A5CEEE12187F3BAD00E55C99 /* InspectorAgent.cpp */, > A5CEEE13187F3BAD00E55C99 /* InspectorAgent.h */, >+ 91278D5221DEB82400B57184 /* InspectorAuditAgent.cpp */, >+ 91278D5321DEB82500B57184 /* InspectorAuditAgent.h */, > A5FD007F189B191A00633231 /* InspectorConsoleAgent.cpp */, > A5FD0080189B191A00633231 /* InspectorConsoleAgent.h */, > A57D23E31890CEBF0031C7FA /* InspectorDebuggerAgent.cpp */, >@@ -7951,6 +7959,8 @@ > A55165D11BDEFDBD003B75C1 /* InspectorScriptProfilerAgent.h */, > A555FF3C2159D41E00FCD826 /* InspectorTargetAgent.cpp */, > A555FF3D2159D41E00FCD826 /* InspectorTargetAgent.h */, >+ 91278D5721DEDA9500B57184 /* JSGlobalObjectAuditAgent.cpp */, >+ 91278D5621DEDA9400B57184 /* JSGlobalObjectAuditAgent.h */, > A57D23E71891B0770031C7FA /* JSGlobalObjectDebuggerAgent.cpp */, > A57D23E81891B0770031C7FA /* JSGlobalObjectDebuggerAgent.h */, > A50E4B5F18809DD50068A46D /* JSGlobalObjectRuntimeAgent.cpp */, >@@ -9077,6 +9087,7 @@ > A593CF7F1840362C00BFCE27 /* InspectorAgentBase.h in Headers */, > A593CF87184038CA00BFCE27 /* InspectorAgentRegistry.h in Headers */, > A5EA710E19F6DF810098F5EC /* InspectorAlternateBackendDispatchers.h in Headers */, >+ 91278D5521DEB82600B57184 /* InspectorAuditAgent.h in Headers */, > 996231E918D1804200C03FDA /* InspectorBackendCommands.js in Headers */, > A593CF7D1840360300BFCE27 /* InspectorBackendDispatcher.h in Headers */, > A532438818568335002ED692 /* InspectorBackendDispatchers.h in Headers */, >@@ -9234,6 +9245,7 @@ > 797E07AA1B8FCFB9008400BA /* JSGlobalLexicalEnvironment.h in Headers */, > BC18C4210E16F5CD00B34460 /* JSGlobalObject.h in Headers */, > 996B731D1BDA08EF00331B84 /* JSGlobalObject.lut.h in Headers */, >+ 91278D5821DEDA9600B57184 /* JSGlobalObjectAuditAgent.h in Headers */, > A5C3A1A618C0490200C9593A /* JSGlobalObjectConsoleClient.h in Headers */, > A59455931824744700CC3843 /* JSGlobalObjectDebuggable.h in Headers */, > A57D23EA1891B0770031C7FA /* JSGlobalObjectDebuggerAgent.h in Headers */, >diff --git a/Source/JavaScriptCore/Sources.txt b/Source/JavaScriptCore/Sources.txt >index cba4c4ba6004f930d5ca8563310a6243e36449e5..39c996a387fea91e0ef9580a819684629daf7f23 100644 >--- a/Source/JavaScriptCore/Sources.txt >+++ b/Source/JavaScriptCore/Sources.txt >@@ -577,12 +577,14 @@ inspector/InspectorFrontendDispatchers.cpp > inspector/InspectorProtocolObjects.cpp > > inspector/agents/InspectorAgent.cpp >+inspector/agents/InspectorAuditAgent.cpp > inspector/agents/InspectorConsoleAgent.cpp > inspector/agents/InspectorDebuggerAgent.cpp > inspector/agents/InspectorHeapAgent.cpp > inspector/agents/InspectorRuntimeAgent.cpp > inspector/agents/InspectorScriptProfilerAgent.cpp > inspector/agents/InspectorTargetAgent.cpp >+inspector/agents/JSGlobalObjectAuditAgent.cpp > inspector/agents/JSGlobalObjectDebuggerAgent.cpp > inspector/agents/JSGlobalObjectRuntimeAgent.cpp > >diff --git a/Source/JavaScriptCore/UnifiedSources-input.xcfilelist b/Source/JavaScriptCore/UnifiedSources-input.xcfilelist >index a5a88cb9b397b7baa3bd19609e473acd3d072baa..e630d63d320f73f1615a78d464f55af81cea56ed 100644 >--- a/Source/JavaScriptCore/UnifiedSources-input.xcfilelist >+++ b/Source/JavaScriptCore/UnifiedSources-input.xcfilelist >@@ -544,12 +544,14 @@ $(SRCROOT)/inspector/ScriptCallStack.cpp > $(SRCROOT)/inspector/ScriptCallStackFactory.cpp > $(SRCROOT)/inspector/ScriptDebugServer.cpp > $(SRCROOT)/inspector/agents/InspectorAgent.cpp >+$(SRCROOT)/inspector/agents/InspectorAuditAgent.cpp > $(SRCROOT)/inspector/agents/InspectorConsoleAgent.cpp > $(SRCROOT)/inspector/agents/InspectorDebuggerAgent.cpp > $(SRCROOT)/inspector/agents/InspectorHeapAgent.cpp > $(SRCROOT)/inspector/agents/InspectorRuntimeAgent.cpp > $(SRCROOT)/inspector/agents/InspectorScriptProfilerAgent.cpp > $(SRCROOT)/inspector/agents/InspectorTargetAgent.cpp >+$(SRCROOT)/inspector/agents/JSGlobalObjectAuditAgent.cpp > $(SRCROOT)/inspector/agents/JSGlobalObjectDebuggerAgent.cpp > $(SRCROOT)/inspector/agents/JSGlobalObjectRuntimeAgent.cpp > $(SRCROOT)/inspector/remote/RemoteAutomationTarget.cpp >diff --git a/Source/JavaScriptCore/inspector/InjectedScript.cpp b/Source/JavaScriptCore/inspector/InjectedScript.cpp >index 0a5a6d7648141f4a916fd5d68a801771401713a4..942333154022556f2e262e037379fe45063611df 100644 >--- a/Source/JavaScriptCore/inspector/InjectedScript.cpp >+++ b/Source/JavaScriptCore/inspector/InjectedScript.cpp >@@ -33,9 +33,11 @@ > #include "InjectedScript.h" > > #include "JSCInlines.h" >+#include "JSLock.h" > #include "ScriptFunctionCall.h" > #include "ScriptObject.h" > #include <wtf/JSONValues.h> >+#include <wtf/Vector.h> > #include <wtf/text/WTFString.h> > > namespace Inspector { >@@ -54,6 +56,19 @@ InjectedScript::~InjectedScript() > { > } > >+void InjectedScript::execute(ErrorString& errorString, const String& functionString, ExecuteOptions&& options, RefPtr<Protocol::Runtime::RemoteObject>& result, Optional<bool>& wasThrown, Optional<int>& savedResultIndex) >+{ >+ Deprecated::ScriptFunctionCall function(injectedScriptObject(), "execute"_s, inspectorEnvironment()->functionCallHandler()); >+ function.appendArgument(functionString); >+ function.appendArgument(options.objectGroup); >+ function.appendArgument(options.includeCommandLineAPI); >+ function.appendArgument(options.returnByValue); >+ function.appendArgument(options.generatePreview); >+ function.appendArgument(options.saveResult); >+ function.appendArgument(arrayFromVector(WTFMove(options.args))); >+ makeEvalCall(errorString, function, result, wasThrown, savedResultIndex); >+} >+ > void InjectedScript::evaluate(ErrorString& errorString, const String& expression, const String& objectGroup, bool includeCommandLineAPI, bool returnByValue, bool generatePreview, bool saveResult, RefPtr<Protocol::Runtime::RemoteObject>& result, Optional<bool>& wasThrown, Optional<int>& savedResultIndex) > { > Deprecated::ScriptFunctionCall function(injectedScriptObject(), "evaluate"_s, inspectorEnvironment()->functionCallHandler()); >@@ -386,5 +401,23 @@ void InjectedScript::releaseObjectGroup(const String& objectGroup) > ASSERT(!hadException); > } > >+JSC::JSValue InjectedScript::arrayFromVector(Vector<JSC::JSValue>&& vector) >+{ >+ JSC::ExecState* execState = scriptState(); >+ if (!execState) >+ return JSC::jsUndefined(); >+ >+ JSC::JSLockHolder lock(execState); >+ >+ JSC::JSArray* array = JSC::constructEmptyArray(execState, nullptr); >+ if (!array) >+ return JSC::jsUndefined(); >+ >+ for (auto& item : vector) >+ array->putDirectIndex(execState, array->length(), item); >+ >+ return array; >+} >+ > } // namespace Inspector > >diff --git a/Source/JavaScriptCore/inspector/InjectedScript.h b/Source/JavaScriptCore/inspector/InjectedScript.h >index f2ba84231d458b521ee842a3672eec0b2873e146..a8db2d2819101d9e5d4e2323182e4a9e93ae2286 100644 >--- a/Source/JavaScriptCore/inspector/InjectedScript.h >+++ b/Source/JavaScriptCore/inspector/InjectedScript.h >@@ -51,6 +51,16 @@ public: > InjectedScript(Deprecated::ScriptObject, InspectorEnvironment*); > virtual ~InjectedScript(); > >+ struct ExecuteOptions { >+ String objectGroup; >+ bool includeCommandLineAPI { false }; >+ bool returnByValue { false }; >+ bool generatePreview { false }; >+ bool saveResult { false }; >+ Vector<JSC::JSValue> args; >+ }; >+ void execute(ErrorString&, const String& functionString, ExecuteOptions&&, RefPtr<Protocol::Runtime::RemoteObject>& result, Optional<bool>& wasThrown, Optional<int>& savedResultIndex); >+ > void evaluate(ErrorString&, const String& expression, const String& objectGroup, bool includeCommandLineAPI, bool returnByValue, bool generatePreview, bool saveResult, RefPtr<Protocol::Runtime::RemoteObject>& result, Optional<bool>& wasThrown, Optional<int>& savedResultIndex); > void awaitPromise(const String& promiseObjectId, bool returnByValue, bool generatePreview, bool saveResult, AsyncCallCallback&&); > void evaluateOnCallFrame(ErrorString&, JSC::JSValue callFrames, const String& callFrameId, const String& expression, const String& objectGroup, bool includeCommandLineAPI, bool returnByValue, bool generatePreview, bool saveResult, RefPtr<Protocol::Runtime::RemoteObject>& result, Optional<bool>& wasThrown, Optional<int>& savedResultIndex); >@@ -79,6 +89,8 @@ public: > void releaseObjectGroup(const String& objectGroup); > > private: >+ JSC::JSValue arrayFromVector(Vector<JSC::JSValue>&&); >+ > friend class InjectedScriptModule; > }; > >diff --git a/Source/JavaScriptCore/inspector/InjectedScriptSource.js b/Source/JavaScriptCore/inspector/InjectedScriptSource.js >index 01c1abeb3e540b91af5e3b3ddbf19b3d8e5acd9a..813e9dc8f5d32fa119087f25f8251656c1e87ae8 100644 >--- a/Source/JavaScriptCore/inspector/InjectedScriptSource.js >+++ b/Source/JavaScriptCore/inspector/InjectedScriptSource.js >@@ -103,9 +103,18 @@ let InjectedScript = class InjectedScript > > // InjectedScript C++ API > >- evaluate(expression, objectGroup, injectCommandLineAPI, returnByValue, generatePreview, saveResult) >+ execute(functionString, objectGroup, includeCommandLineAPI, returnByValue, generatePreview, saveResult, args) > { >- return this._evaluateAndWrap(InjectedScriptHost.evaluateWithScopeExtension, InjectedScriptHost, expression, objectGroup, false, injectCommandLineAPI, returnByValue, generatePreview, saveResult); >+ return this._wrapAndSaveCall(objectGroup, returnByValue, generatePreview, saveResult, () => { >+ const isEvalOnCallFrame = false; >+ return this._evaluateOn(InjectedScriptHost.evaluateWithScopeExtension, InjectedScriptHost, functionString, isEvalOnCallFrame, includeCommandLineAPI).apply(undefined, args); >+ }); >+ } >+ >+ evaluate(expression, objectGroup, includeCommandLineAPI, returnByValue, generatePreview, saveResult) >+ { >+ const isEvalOnCallFrame = false; >+ return this._evaluateAndWrap(InjectedScriptHost.evaluateWithScopeExtension, InjectedScriptHost, expression, objectGroup, isEvalOnCallFrame, includeCommandLineAPI, returnByValue, generatePreview, saveResult); > } > > awaitPromise(promiseObjectId, returnByValue, generatePreview, saveResult, callback) >@@ -145,12 +154,13 @@ let InjectedScript = class InjectedScript > promiseObject.then(resolve, reject); > } > >- evaluateOnCallFrame(topCallFrame, callFrameId, expression, objectGroup, injectCommandLineAPI, returnByValue, generatePreview, saveResult) >+ evaluateOnCallFrame(topCallFrame, callFrameId, expression, objectGroup, includeCommandLineAPI, returnByValue, generatePreview, saveResult) > { > let callFrame = this._callFrameForId(topCallFrame, callFrameId); > if (!callFrame) > return "Could not find call frame with given id"; >- return this._evaluateAndWrap(callFrame.evaluateWithScopeExtension, callFrame, expression, objectGroup, true, injectCommandLineAPI, returnByValue, generatePreview, saveResult); >+ const isEvalOnCallFrame = true; >+ return this._evaluateAndWrap(callFrame.evaluateWithScopeExtension, callFrame, expression, objectGroup, isEvalOnCallFrame, includeCommandLineAPI, returnByValue, generatePreview, saveResult); > } > > callFunctionOn(objectId, expression, args, returnByValue, generatePreview) >@@ -501,14 +511,31 @@ let InjectedScript = class InjectedScript > }; > } > >- _evaluateAndWrap(evalFunction, object, expression, objectGroup, isEvalOnCallFrame, injectCommandLineAPI, returnByValue, generatePreview, saveResult) >+ _evaluateAndWrap(evalFunction, object, expression, objectGroup, isEvalOnCallFrame, includeCommandLineAPI, returnByValue, generatePreview, saveResult) >+ { >+ return this._wrapAndSaveCall(objectGroup, returnByValue, generatePreview, saveResult, () => { >+ return this._evaluateOn(evalFunction, object, expression, isEvalOnCallFrame, includeCommandLineAPI); >+ }); >+ } >+ >+ _wrapAndSaveCall(objectGroup, returnByValue, generatePreview, saveResult, func) >+ { >+ return this._wrapCall(objectGroup, returnByValue, generatePreview, saveResult, () => { >+ let result = func(); >+ if (saveResult) >+ this._saveResult(result); >+ return result; >+ }); >+ } >+ >+ _wrapCall(objectGroup, returnByValue, generatePreview, saveResult, func) > { > try { > this._savedResultIndex = 0; > > let returnObject = { > wasThrown: false, >- result: RemoteObject.create(this._evaluateOn(evalFunction, object, objectGroup, expression, isEvalOnCallFrame, injectCommandLineAPI, saveResult), objectGroup, returnByValue, generatePreview) >+ result: RemoteObject.create(func(), objectGroup, returnByValue, generatePreview) > }; > > if (saveResult && this._savedResultIndex) >@@ -520,20 +547,17 @@ let InjectedScript = class InjectedScript > } > } > >- _evaluateOn(evalFunction, object, objectGroup, expression, isEvalOnCallFrame, injectCommandLineAPI, saveResult) >+ _evaluateOn(evalFunction, object, expression, isEvalOnCallFrame, includeCommandLineAPI) > { > let commandLineAPI = null; >- if (injectCommandLineAPI) { >+ if (includeCommandLineAPI) { > if (this.CommandLineAPI) > commandLineAPI = new this.CommandLineAPI(this._commandLineAPIImpl, isEvalOnCallFrame ? object : null); > else > commandLineAPI = new BasicCommandLineAPI(isEvalOnCallFrame ? object : null); > } > >- let result = evalFunction.call(object, expression, commandLineAPI); >- if (saveResult) >- this._saveResult(result); >- return result; >+ return evalFunction.call(object, expression, commandLineAPI); > } > > _callFrameForId(topCallFrame, callFrameId) >diff --git a/Source/JavaScriptCore/inspector/JSGlobalObjectInspectorController.cpp b/Source/JavaScriptCore/inspector/JSGlobalObjectInspectorController.cpp >index ad45f6f5303ca8dc41ad776a9fc7c8457548d5a1..0e62aa40e8725bfcdb0f655ca87a5a4427a8dcf8 100644 >--- a/Source/JavaScriptCore/inspector/JSGlobalObjectInspectorController.cpp >+++ b/Source/JavaScriptCore/inspector/JSGlobalObjectInspectorController.cpp >@@ -42,6 +42,7 @@ > #include "InspectorScriptProfilerAgent.h" > #include "JSCInlines.h" > #include "JSGlobalObject.h" >+#include "JSGlobalObjectAuditAgent.h" > #include "JSGlobalObjectConsoleClient.h" > #include "JSGlobalObjectDebuggerAgent.h" > #include "JSGlobalObjectRuntimeAgent.h" >@@ -68,17 +69,7 @@ JSGlobalObjectInspectorController::JSGlobalObjectInspectorController(JSGlobalObj > , m_frontendRouter(FrontendRouter::create()) > , m_backendDispatcher(BackendDispatcher::create(m_frontendRouter.copyRef())) > { >- AgentContext baseContext = { >- *this, >- *m_injectedScriptManager, >- m_frontendRouter.get(), >- m_backendDispatcher.get() >- }; >- >- JSAgentContext context = { >- baseContext, >- globalObject >- }; >+ auto context = jsAgentContext(); > > auto inspectorAgent = std::make_unique<InspectorAgent>(context); > auto runtimeAgent = std::make_unique<JSGlobalObjectRuntimeAgent>(context); >@@ -124,6 +115,8 @@ void JSGlobalObjectInspectorController::connectFrontend(FrontendChannel& fronten > m_isAutomaticInspection = isAutomaticInspection; > m_pauseAfterInitialization = immediatelyPause; > >+ createLazyAgents(); >+ > bool connectedFirstFrontend = !m_frontendRouter->hasFrontends(); > m_frontendRouter->connectFrontend(frontendChannel); > >@@ -295,4 +288,33 @@ void JSGlobalObjectInspectorController::appendExtraAgent(std::unique_ptr<Inspect > } > #endif > >+JSAgentContext JSGlobalObjectInspectorController::jsAgentContext() >+{ >+ AgentContext baseContext = { >+ *this, >+ *m_injectedScriptManager, >+ m_frontendRouter.get(), >+ m_backendDispatcher.get() >+ }; >+ >+ JSAgentContext context = { >+ baseContext, >+ m_globalObject >+ }; >+ >+ return context; >+} >+ >+void JSGlobalObjectInspectorController::createLazyAgents() >+{ >+ if (m_didCreateLazyAgents) >+ return; >+ >+ m_didCreateLazyAgents = true; >+ >+ auto context = jsAgentContext(); >+ >+ m_agents.append(std::make_unique<JSGlobalObjectAuditAgent>(context)); >+} >+ > } // namespace Inspector >diff --git a/Source/JavaScriptCore/inspector/JSGlobalObjectInspectorController.h b/Source/JavaScriptCore/inspector/JSGlobalObjectInspectorController.h >index c2188d8bc47dee383c03f20c0c59317092f9fe05..1aa05b5d1863fd29a64b0f25309f373afb649786 100644 >--- a/Source/JavaScriptCore/inspector/JSGlobalObjectInspectorController.h >+++ b/Source/JavaScriptCore/inspector/JSGlobalObjectInspectorController.h >@@ -55,6 +55,7 @@ class InspectorDebuggerAgent; > class InspectorScriptProfilerAgent; > class JSGlobalObjectConsoleClient; > class ScriptCallStack; >+struct JSAgentContext; > > class JSGlobalObjectInspectorController final > : public InspectorEnvironment >@@ -103,6 +104,9 @@ public: > private: > void appendAPIBacktrace(ScriptCallStack&); > >+ JSAgentContext jsAgentContext(); >+ void createLazyAgents(); >+ > JSC::JSGlobalObject& m_globalObject; > std::unique_ptr<InjectedScriptManager> m_injectedScriptManager; > std::unique_ptr<JSGlobalObjectConsoleClient> m_consoleClient; >@@ -124,6 +128,7 @@ private: > bool m_includeNativeCallStackWithExceptions { true }; > bool m_isAutomaticInspection { false }; > bool m_pauseAfterInitialization { false }; >+ bool m_didCreateLazyAgents { false }; > > #if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS) > AugmentableInspectorControllerClient* m_augmentingClient { nullptr }; >diff --git a/Source/JavaScriptCore/inspector/agents/InspectorAuditAgent.cpp b/Source/JavaScriptCore/inspector/agents/InspectorAuditAgent.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..0545d68c5a5d6ddfe9c0375d8cc7aaf8a1e86f10 >--- /dev/null >+++ b/Source/JavaScriptCore/inspector/agents/InspectorAuditAgent.cpp >@@ -0,0 +1,101 @@ >+/* >+ * Copyright (C) 2019 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#include "config.h" >+#include "InspectorAuditAgent.h" >+ >+#include "InjectedScript.h" >+#include "InjectedScriptManager.h" >+#include "ScriptDebugServer.h" >+#include <wtf/RefPtr.h> >+#include <wtf/Vector.h> >+#include <wtf/text/StringBuilder.h> >+#include <wtf/text/WTFString.h> >+ >+namespace Inspector { >+ >+using namespace JSC; >+ >+InspectorAuditAgent::InspectorAuditAgent(AgentContext& context) >+ : InspectorAgentBase("Audit"_s) >+ , m_backendDispatcher(AuditBackendDispatcher::create(context.backendDispatcher, this)) >+ , m_injectedScriptManager(context.injectedScriptManager) >+ , m_scriptDebugServer(context.environment.scriptDebugServer()) >+{ >+} >+ >+void InspectorAuditAgent::didCreateFrontendAndBackend(FrontendRouter*, BackendDispatcher*) >+{ >+} >+ >+void InspectorAuditAgent::willDestroyFrontendAndBackend(DisconnectReason) >+{ >+} >+ >+void InspectorAuditAgent::run(ErrorString& errorString, const String& test, const int* executionContextId, RefPtr<Protocol::Runtime::RemoteObject>& result, Optional<bool>& wasThrown) >+{ >+ InjectedScript injectedScript = injectedScriptForEval(errorString, executionContextId); >+ if (injectedScript.hasNoValue()) >+ return; >+ >+ auto arguments = runArguments(executionContextId); >+ >+ StringBuilder argumentStringBuilder; >+ Vector<JSC::JSValue> argumentValues; >+ for (size_t i = 0; i < arguments.size(); ++i) { >+ if (i) >+ argumentStringBuilder.appendLiteral(", "); >+ argumentStringBuilder.append(arguments[i].first); >+ >+ argumentValues.append(arguments[i].second); >+ } >+ String argumentsString = argumentStringBuilder.toString(); >+ >+ String functionString = makeString("(function(", argumentsString, ") { \"use strict\"; return eval(`(", test.isolatedCopy().replace('`', "\\`"), ")`)(); })"); >+ >+ InjectedScript::ExecuteOptions options; >+ options.objectGroup = "audit"_s; >+ options.includeCommandLineAPI = true; >+ options.args = WTFMove(argumentValues); >+ >+ Optional<int> savedResultIndex; >+ >+ ScriptDebugServer::PauseOnExceptionsState previousPauseOnExceptionsState = m_scriptDebugServer.pauseOnExceptionsState(); >+ >+ m_scriptDebugServer.setPauseOnExceptionsState(ScriptDebugServer::DontPauseOnExceptions); >+ muteConsole(); >+ >+ injectedScript.execute(errorString, functionString, WTFMove(options), result, wasThrown, savedResultIndex); >+ >+ unmuteConsole(); >+ m_scriptDebugServer.setPauseOnExceptionsState(previousPauseOnExceptionsState); >+} >+ >+Vector<std::pair<String, JSC::JSValue>> InspectorAuditAgent::runArguments(const int* /* executionContextId */) >+{ >+ return { }; >+} >+ >+} // namespace Inspector >diff --git a/Source/JavaScriptCore/inspector/agents/InspectorAuditAgent.h b/Source/JavaScriptCore/inspector/agents/InspectorAuditAgent.h >new file mode 100644 >index 0000000000000000000000000000000000000000..bc1e340b7d946f294a7f2a47b6fe176b9aeccb61 >--- /dev/null >+++ b/Source/JavaScriptCore/inspector/agents/InspectorAuditAgent.h >@@ -0,0 +1,71 @@ >+/* >+ * Copyright (C) 2019 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#pragma once >+ >+#include "InspectorAgentBase.h" >+#include "InspectorBackendDispatchers.h" >+#include "JSCInlines.h" >+#include <wtf/FastMalloc.h> >+#include <wtf/Forward.h> >+#include <wtf/Noncopyable.h> >+ >+namespace Inspector { >+ >+class InjectedScript; >+class InjectedScriptManager; >+class ScriptDebugServer; >+typedef String ErrorString; >+ >+class JS_EXPORT_PRIVATE InspectorAuditAgent : public InspectorAgentBase, public AuditBackendDispatcherHandler { >+ WTF_MAKE_NONCOPYABLE(InspectorAuditAgent); >+ WTF_MAKE_FAST_ALLOCATED; >+public: >+ virtual ~InspectorAuditAgent() = default; >+ >+ void didCreateFrontendAndBackend(FrontendRouter*, BackendDispatcher*) override; >+ void willDestroyFrontendAndBackend(DisconnectReason) override; >+ >+ void run(ErrorString&, const String& test, const int* executionContextId, RefPtr<Protocol::Runtime::RemoteObject>& result, Optional<bool>& wasThrown) final; >+ >+protected: >+ explicit InspectorAuditAgent(AgentContext&); >+ >+ InjectedScriptManager& injectedScriptManager() { return m_injectedScriptManager; } >+ >+ virtual InjectedScript injectedScriptForEval(ErrorString&, const int* executionContextId) = 0; >+ >+ virtual Vector<std::pair<String, JSC::JSValue>> runArguments(const int* executionContextId); >+ >+ virtual void muteConsole() { }; >+ virtual void unmuteConsole() { }; >+ >+private: >+ RefPtr<AuditBackendDispatcher> m_backendDispatcher; >+ InjectedScriptManager& m_injectedScriptManager; >+ ScriptDebugServer& m_scriptDebugServer; >+}; >+ >+} // namespace Inspector >diff --git a/Source/JavaScriptCore/inspector/agents/JSGlobalObjectAuditAgent.cpp b/Source/JavaScriptCore/inspector/agents/JSGlobalObjectAuditAgent.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..86e767ba0daff17f532d075daf655c7dcd613d58 >--- /dev/null >+++ b/Source/JavaScriptCore/inspector/agents/JSGlobalObjectAuditAgent.cpp >@@ -0,0 +1,62 @@ >+/* >+ * Copyright (C) 2019 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#include "config.h" >+#include "JSGlobalObjectAuditAgent.h" >+ >+#include "InjectedScript.h" >+#include "InjectedScriptManager.h" >+#include "JSCInlines.h" >+#include "JSGlobalObject.h" >+#include <wtf/Ref.h> >+#include <wtf/RefPtr.h> >+#include <wtf/text/WTFString.h> >+ >+using namespace JSC; >+ >+namespace Inspector { >+ >+JSGlobalObjectAuditAgent::JSGlobalObjectAuditAgent(JSAgentContext& context) >+ : InspectorAuditAgent(context) >+ , m_globalObject(context.inspectedGlobalObject) >+{ >+} >+ >+InjectedScript JSGlobalObjectAuditAgent::injectedScriptForEval(ErrorString& errorString, const int* executionContextId) >+{ >+ if (executionContextId) { >+ errorString = "Execution context id is not supported for JSContexts as there is only one execution context."_s; >+ return InjectedScript(); >+ } >+ >+ JSC::ExecState* scriptState = m_globalObject.globalExec(); >+ InjectedScript injectedScript = injectedScriptManager().injectedScriptFor(scriptState); >+ if (injectedScript.hasNoValue()) >+ errorString = "Internal error: main world execution context not found."_s; >+ >+ return injectedScript; >+} >+ >+} // namespace Inspector >diff --git a/Source/JavaScriptCore/inspector/agents/JSGlobalObjectAuditAgent.h b/Source/JavaScriptCore/inspector/agents/JSGlobalObjectAuditAgent.h >new file mode 100644 >index 0000000000000000000000000000000000000000..c1cad323690d7bab6e2f56019b4eba8197b4481c >--- /dev/null >+++ b/Source/JavaScriptCore/inspector/agents/JSGlobalObjectAuditAgent.h >@@ -0,0 +1,48 @@ >+/* >+ * Copyright (C) 2019 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#pragma once >+ >+#include "InspectorAuditAgent.h" >+ >+namespace JSC { >+class JSGlobalObject; >+} >+ >+namespace Inspector { >+ >+class JSGlobalObjectAuditAgent final : public InspectorAuditAgent { >+ WTF_MAKE_NONCOPYABLE(JSGlobalObjectAuditAgent); >+ WTF_MAKE_FAST_ALLOCATED; >+public: >+ explicit JSGlobalObjectAuditAgent(JSAgentContext&); >+ >+private: >+ InjectedScript injectedScriptForEval(ErrorString&, const int* executionContextId) override; >+ >+ JSC::JSGlobalObject& m_globalObject; >+}; >+ >+} // namespace Inspector >diff --git a/Source/JavaScriptCore/inspector/protocol/Audit.json b/Source/JavaScriptCore/inspector/protocol/Audit.json >new file mode 100644 >index 0000000000000000000000000000000000000000..8175a7dd2fcee52035f4a9481ba69174f208cc78 >--- /dev/null >+++ b/Source/JavaScriptCore/inspector/protocol/Audit.json >@@ -0,0 +1,18 @@ >+{ >+ "domain": "Audit", >+ "description": "", >+ "commands": [ >+ { >+ "name": "run", >+ "description": "Parses and evaluates the given test string and sends back the result.", >+ "parameters": [ >+ { "name": "test", "type": "string", "description": "Test string to parse and evaluate." }, >+ { "name": "contextId", "$ref": "Runtime.ExecutionContextId", "optional": true, "description": "Specifies in which isolated context to run the test. 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." } >+ ], >+ "returns": [ >+ { "name": "result", "$ref": "Runtime.RemoteObject", "description": "Evaluation result." }, >+ { "name": "wasThrown", "type": "boolean", "optional": true, "description": "True if the result was thrown during the evaluation." } >+ ] >+ } >+ ] >+} >diff --git a/Source/WebCore/CMakeLists.txt b/Source/WebCore/CMakeLists.txt >index 9c51418af76624841ebbf5c6589f250df85f1d50..04c2c382b5769a79f04e997c26144cc1fcd335ae 100644 >--- a/Source/WebCore/CMakeLists.txt >+++ b/Source/WebCore/CMakeLists.txt >@@ -884,6 +884,7 @@ set(WebCore_NON_SVG_IDL_FILES > html/canvas/WebMetalTextureDescriptor.idl > > inspector/CommandLineAPIHost.idl >+ inspector/InspectorAuditUtilities.idl > inspector/InspectorFrontendHost.idl > > loader/appcache/DOMApplicationCache.idl >diff --git a/Source/WebCore/DerivedSources-input.xcfilelist b/Source/WebCore/DerivedSources-input.xcfilelist >index 90b25fa1e53185a10d30ae5ef1d34f5ae8cc475f..a586104b52936b92e2e0c299ef7a00ef5f314d57 100644 >--- a/Source/WebCore/DerivedSources-input.xcfilelist >+++ b/Source/WebCore/DerivedSources-input.xcfilelist >@@ -808,6 +808,7 @@ $(PROJECT_DIR)/html/track/VideoTrack.idl > $(PROJECT_DIR)/html/track/VideoTrackList.idl > $(PROJECT_DIR)/inspector/CommandLineAPIHost.idl > $(PROJECT_DIR)/inspector/CommandLineAPIModuleSource.js >+$(PROJECT_DIR)/inspector/InspectorAuditUtilities.idl > $(PROJECT_DIR)/inspector/InspectorFrontendHost.idl > $(PROJECT_DIR)/inspector/InspectorOverlayPage.css > $(PROJECT_DIR)/inspector/InspectorOverlayPage.html >diff --git a/Source/WebCore/DerivedSources-output.xcfilelist b/Source/WebCore/DerivedSources-output.xcfilelist >index dfbb88b0c675c70c10cc27ce8a26fa148ce67cc8..a4293521d0b6bf37a466f0ee5e6f249b123cc433 100644 >--- a/Source/WebCore/DerivedSources-output.xcfilelist >+++ b/Source/WebCore/DerivedSources-output.xcfilelist >@@ -814,6 +814,8 @@ $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSImageSmoothingQuality.cpp > $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSImageSmoothingQuality.h > $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSInputEvent.cpp > $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSInputEvent.h >+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSInspectorAuditUtilities.cpp >+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSInspectorAuditUtilities.h > $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSInspectorFrontendHost.cpp > $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSInspectorFrontendHost.h > $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSInternalSettings.cpp >diff --git a/Source/WebCore/DerivedSources.make b/Source/WebCore/DerivedSources.make >index e948b702f37a566e550a5ebe56e602fcb7922f8f..5d9f54f36636039d7c20d8d580acebf4aa7f98b5 100644 >--- a/Source/WebCore/DerivedSources.make >+++ b/Source/WebCore/DerivedSources.make >@@ -835,6 +835,7 @@ JS_BINDING_IDLS = \ > $(WebCore)/html/track/VideoTrack.idl \ > $(WebCore)/html/track/VideoTrackList.idl \ > $(WebCore)/inspector/CommandLineAPIHost.idl \ >+ $(WebCore)/inspector/InspectorAuditUtilities.idl \ > $(WebCore)/inspector/InspectorFrontendHost.idl \ > $(WebCore)/loader/appcache/DOMApplicationCache.idl \ > $(WebCore)/page/BarProp.idl \ >diff --git a/Source/WebCore/Sources.txt b/Source/WebCore/Sources.txt >index 6930288d5dd06ab99414aa14ce258cef81bcba1f..ae4f75ffd865752e5c81503b757a2c63acc0b5ec 100644 >--- a/Source/WebCore/Sources.txt >+++ b/Source/WebCore/Sources.txt >@@ -1217,6 +1217,7 @@ inspector/CommandLineAPIHost.cpp > inspector/CommandLineAPIModule.cpp > inspector/DOMEditor.cpp > inspector/DOMPatchSupport.cpp >+inspector/InspectorAuditUtilities.cpp > inspector/InspectorCanvas.cpp > inspector/InspectorClient.cpp > inspector/InspectorController.cpp >@@ -1257,6 +1258,7 @@ inspector/agents/WebConsoleAgent.cpp > inspector/agents/WebDebuggerAgent.cpp > inspector/agents/WebHeapAgent.cpp > >+inspector/agents/page/PageAuditAgent.cpp > inspector/agents/page/PageConsoleAgent.cpp > inspector/agents/page/PageDebuggerAgent.cpp > inspector/agents/page/PageHeapAgent.cpp >@@ -1264,6 +1266,7 @@ inspector/agents/page/PageNetworkAgent.cpp > inspector/agents/page/PageRuntimeAgent.cpp > > inspector/agents/worker/ServiceWorkerAgent.cpp >+inspector/agents/worker/WorkerAuditAgent.cpp > inspector/agents/worker/WorkerConsoleAgent.cpp > inspector/agents/worker/WorkerDebuggerAgent.cpp > inspector/agents/worker/WorkerNetworkAgent.cpp >@@ -2816,6 +2819,7 @@ JSImageBitmapRenderingContextSettings.cpp > JSImageData.cpp > JSImageSmoothingQuality.cpp > JSInputEvent.cpp >+JSInspectorAuditUtilities.cpp > JSInspectorFrontendHost.cpp > JSIntersectionObserver.cpp > JSIntersectionObserverCallback.cpp >diff --git a/Source/WebCore/UnifiedSources-input.xcfilelist b/Source/WebCore/UnifiedSources-input.xcfilelist >index dfc2a3c29529a4146448ec8c3b5bcee081411730..375d6d7467d170a7c298acca6cfb23a9f7e62c53 100644 >--- a/Source/WebCore/UnifiedSources-input.xcfilelist >+++ b/Source/WebCore/UnifiedSources-input.xcfilelist >@@ -391,6 +391,7 @@ $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSImageBitmapRenderingContextSettin > $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSImageData.cpp > $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSImageSmoothingQuality.cpp > $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSInputEvent.cpp >+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSInspectorAuditUtilities.cpp > $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSInspectorFrontendHost.cpp > $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSIntersectionObserver.cpp > $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSIntersectionObserverCallback.cpp >@@ -2173,6 +2174,7 @@ $(SRCROOT)/inspector/CommandLineAPIHost.cpp > $(SRCROOT)/inspector/CommandLineAPIModule.cpp > $(SRCROOT)/inspector/DOMEditor.cpp > $(SRCROOT)/inspector/DOMPatchSupport.cpp >+$(SRCROOT)/inspector/InspectorAuditUtilities.cpp > $(SRCROOT)/inspector/InspectorCanvas.cpp > $(SRCROOT)/inspector/InspectorClient.cpp > $(SRCROOT)/inspector/InspectorController.cpp >@@ -2211,12 +2213,14 @@ $(SRCROOT)/inspector/agents/InspectorWorkerAgent.cpp > $(SRCROOT)/inspector/agents/WebConsoleAgent.cpp > $(SRCROOT)/inspector/agents/WebDebuggerAgent.cpp > $(SRCROOT)/inspector/agents/WebHeapAgent.cpp >+$(SRCROOT)/inspector/agents/page/PageAuditAgent.cpp > $(SRCROOT)/inspector/agents/page/PageConsoleAgent.cpp > $(SRCROOT)/inspector/agents/page/PageDebuggerAgent.cpp > $(SRCROOT)/inspector/agents/page/PageHeapAgent.cpp > $(SRCROOT)/inspector/agents/page/PageNetworkAgent.cpp > $(SRCROOT)/inspector/agents/page/PageRuntimeAgent.cpp > $(SRCROOT)/inspector/agents/worker/ServiceWorkerAgent.cpp >+$(SRCROOT)/inspector/agents/worker/WorkerAuditAgent.cpp > $(SRCROOT)/inspector/agents/worker/WorkerConsoleAgent.cpp > $(SRCROOT)/inspector/agents/worker/WorkerDebuggerAgent.cpp > $(SRCROOT)/inspector/agents/worker/WorkerNetworkAgent.cpp >diff --git a/Source/WebCore/WebCore.xcodeproj/project.pbxproj b/Source/WebCore/WebCore.xcodeproj/project.pbxproj >index aa774f9e5dd7ccb30a3dc2bdb91936ada6b693f7..d34dfe1a3d0137a98613ed9bd29b3180ef222233 100644 >--- a/Source/WebCore/WebCore.xcodeproj/project.pbxproj >+++ b/Source/WebCore/WebCore.xcodeproj/project.pbxproj >@@ -2576,6 +2576,10 @@ > 9001774012E0347800648462 /* OESStandardDerivatives.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9001773D12E0347800648462 /* OESStandardDerivatives.cpp */; }; > 9001774112E0347800648462 /* OESStandardDerivatives.h in Headers */ = {isa = PBXBuildFile; fileRef = 9001773E12E0347800648462 /* OESStandardDerivatives.h */; }; > 9001788112E0370700648462 /* JSOESStandardDerivatives.h in Headers */ = {isa = PBXBuildFile; fileRef = 9001787F12E0370700648462 /* JSOESStandardDerivatives.h */; }; >+ 91278D5E21DEDAD600B57184 /* PageAuditAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = 91278D5C21DEDAD500B57184 /* PageAuditAgent.h */; }; >+ 91278D6221DEDAF000B57184 /* WorkerAuditAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = 91278D6021DEDAF000B57184 /* WorkerAuditAgent.h */; }; >+ 91278D6D21DEDC8000B57184 /* InspectorAuditUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 91278D6A21DEDC7E00B57184 /* InspectorAuditUtilities.h */; }; >+ 91278D6D21DEDC8000B57185 /* JSInspectorAuditUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 91278D6A21DEDC7E00B57185 /* JSInspectorAuditUtilities.h */; }; > 91B8F0B521953D65000C2B00 /* CertificateInfoBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 91B8F0B321953D65000C2B00 /* CertificateInfoBase.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 91B952241F58A58F00931DC2 /* RecordingSwizzleTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 91B952221F58A58000931DC2 /* RecordingSwizzleTypes.h */; }; > 91C9F2F91AE3BEB00095B61C /* AXTextStateChangeIntent.h in Headers */ = {isa = PBXBuildFile; fileRef = 91C9F2F81AE3BE240095B61C /* AXTextStateChangeIntent.h */; settings = {ATTRIBUTES = (Private, ); }; }; >@@ -10348,6 +10352,14 @@ > 9001773F12E0347800648462 /* OESStandardDerivatives.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = OESStandardDerivatives.idl; sourceTree = "<group>"; }; > 9001787E12E0370700648462 /* JSOESStandardDerivatives.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSOESStandardDerivatives.cpp; sourceTree = "<group>"; }; > 9001787F12E0370700648462 /* JSOESStandardDerivatives.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSOESStandardDerivatives.h; sourceTree = "<group>"; }; >+ 91278D5A21DEDAD500B57184 /* PageAuditAgent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PageAuditAgent.cpp; sourceTree = "<group>"; }; >+ 91278D5C21DEDAD500B57184 /* PageAuditAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PageAuditAgent.h; sourceTree = "<group>"; }; >+ 91278D5F21DEDAEF00B57184 /* WorkerAuditAgent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WorkerAuditAgent.cpp; sourceTree = "<group>"; }; >+ 91278D6021DEDAF000B57184 /* WorkerAuditAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WorkerAuditAgent.h; sourceTree = "<group>"; }; >+ 91278D6A21DEDC7E00B57184 /* InspectorAuditUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorAuditUtilities.h; sourceTree = "<group>"; }; >+ 91278D6B21DEDC7F00B57184 /* InspectorAuditUtilities.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorAuditUtilities.cpp; sourceTree = "<group>"; }; >+ 91278D6A21DEDC7E00B57185 /* JSInspectorAuditUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSInspectorAuditUtilities.h; sourceTree = "<group>"; }; >+ 91278D6B21DEDC7F00B57185 /* JSInspectorAuditUtilities.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSInspectorAuditUtilities.cpp; sourceTree = "<group>"; }; > 91B8F0B321953D65000C2B00 /* CertificateInfoBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CertificateInfoBase.h; sourceTree = "<group>"; }; > 91B952221F58A58000931DC2 /* RecordingSwizzleTypes.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RecordingSwizzleTypes.h; sourceTree = "<group>"; }; > 91C9F2F81AE3BE240095B61C /* AXTextStateChangeIntent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AXTextStateChangeIntent.h; sourceTree = "<group>"; }; >@@ -16768,6 +16780,8 @@ > A584FE2518637DAB00843B10 /* CommandLineAPIModuleSource.h */, > A584FE391864E2D800843B10 /* JSCommandLineAPIHost.cpp */, > A584FE3A1864E2D800843B10 /* JSCommandLineAPIHost.h */, >+ 91278D6B21DEDC7F00B57185 /* JSInspectorAuditUtilities.cpp */, >+ 91278D6A21DEDC7E00B57185 /* JSInspectorAuditUtilities.h */, > 7A0E771C10C00DB100A0276E /* JSInspectorFrontendHost.cpp */, > 7A0E771D10C00DB100A0276E /* JSInspectorFrontendHost.h */, > ); >@@ -16788,6 +16802,8 @@ > 7AABA25814BC613300AA9A11 /* DOMEditor.h */, > 7A54881614E432A1006AE05A /* DOMPatchSupport.cpp */, > 7A54881514E432A1006AE05A /* DOMPatchSupport.h */, >+ 91278D6B21DEDC7F00B57184 /* InspectorAuditUtilities.cpp */, >+ 91278D6A21DEDC7E00B57184 /* InspectorAuditUtilities.h */, > 6A22E8721F1042C400F546C3 /* InspectorCanvas.cpp */, > 6A22E86F1F10418600F546C3 /* InspectorCanvas.h */, > 7A1F2B51126C61B20006A7E6 /* InspectorClient.cpp */, >@@ -22173,6 +22189,8 @@ > A5B81CB91FAA44820037D1E6 /* page */ = { > isa = PBXGroup; > children = ( >+ 91278D5A21DEDAD500B57184 /* PageAuditAgent.cpp */, >+ 91278D5C21DEDAD500B57184 /* PageAuditAgent.h */, > A5B81CC01FAA44B70037D1E6 /* PageConsoleAgent.cpp */, > A5B81CBB1FAA44B70037D1E6 /* PageConsoleAgent.h */, > A5B81CBD1FAA44B70037D1E6 /* PageDebuggerAgent.cpp */, >@@ -22192,6 +22210,8 @@ > children = ( > A581ED121FB288C900CED4EC /* ServiceWorkerAgent.cpp */, > A581ED101FB288C800CED4EC /* ServiceWorkerAgent.h */, >+ 91278D5F21DEDAEF00B57184 /* WorkerAuditAgent.cpp */, >+ 91278D6021DEDAF000B57184 /* WorkerAuditAgent.h */, > A5B81CCB1FAA44DA0037D1E6 /* WorkerConsoleAgent.cpp */, > A5B81CCA1FAA44DA0037D1E6 /* WorkerConsoleAgent.h */, > A5B81CC81FAA44DA0037D1E6 /* WorkerDebuggerAgent.cpp */, >@@ -29210,6 +29230,7 @@ > 93309DF0099E64920056E581 /* InsertParagraphSeparatorCommand.h in Headers */, > 93309DF2099E64920056E581 /* InsertTextCommand.h in Headers */, > A5B81CA71FAA44620037D1E6 /* InspectorApplicationCacheAgent.h in Headers */, >+ 91278D6D21DEDC8000B57184 /* InspectorAuditUtilities.h in Headers */, > 6A22E8701F10418600F546C3 /* InspectorCanvas.h in Headers */, > A5B81CA81FAA44620037D1E6 /* InspectorCanvasAgent.h in Headers */, > 1C81B95C0E97330800266E07 /* InspectorClient.h in Headers */, >@@ -29642,6 +29663,7 @@ > A77979290D6B9E64003851B9 /* JSImageData.h in Headers */, > 7C193C011F5E11050088F3E6 /* JSImageSmoothingQuality.h in Headers */, > A86629D309DA2B48009633A6 /* JSInputEvent.h in Headers */, >+ 91278D6D21DEDC8000B57185 /* JSInspectorAuditUtilities.h in Headers */, > 7A0E771F10C00DB100A0276E /* JSInspectorFrontendHost.h in Headers */, > 0F4710E61DB700C7002DCEC3 /* JSIntersectionObserver.h in Headers */, > 0F8B45761DC41DBA00443C3F /* JSIntersectionObserverCallback.h in Headers */, >@@ -30462,6 +30484,7 @@ > 1A0D57370A5C77FE007EDD4C /* OverflowEvent.h in Headers */, > 3774ABA50FA21EB400AD7DE9 /* OverlapTestRequestClient.h in Headers */, > 65A21468097A329100B9050A /* Page.h in Headers */, >+ 91278D5E21DEDAD600B57184 /* PageAuditAgent.h in Headers */, > 1477E7770BF4134A00152872 /* PageCache.h in Headers */, > CD5E5B5F1A15CE54000C609E /* PageConfiguration.h in Headers */, > A5B81CC21FAA44BC0037D1E6 /* PageConsoleAgent.h in Headers */, >@@ -31882,6 +31905,7 @@ > A14832C6187F668F00DA63A6 /* WKViewPrivate.h in Headers */, > 379919971200DDF400EA041C /* WOFFFileFormat.h in Headers */, > 2E4346460F546A8200B0F1BA /* Worker.h in Headers */, >+ 91278D6221DEDAF000B57184 /* WorkerAuditAgent.h in Headers */, > 41A7D3531F438D16008988DE /* WorkerCacheStorageConnection.h in Headers */, > A5B81CCD1FAA44DE0037D1E6 /* WorkerConsoleAgent.h in Headers */, > A55639D11C6F09E300806D8E /* WorkerConsoleClient.h in Headers */, >diff --git a/Source/WebCore/inspector/InspectorAuditUtilities.cpp b/Source/WebCore/inspector/InspectorAuditUtilities.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..6acb337df205259892e99de181db45dad567edf3 >--- /dev/null >+++ b/Source/WebCore/inspector/InspectorAuditUtilities.cpp >@@ -0,0 +1,36 @@ >+/* >+ * Copyright (C) 2019 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+ >+#include "config.h" >+#include "InspectorAuditUtilities.h" >+ >+namespace WebCore { >+ >+InspectorAuditUtilities::InspectorAuditUtilities() >+{ >+} >+ >+} // namespace WebCore >diff --git a/Source/WebCore/inspector/InspectorAuditUtilities.h b/Source/WebCore/inspector/InspectorAuditUtilities.h >new file mode 100644 >index 0000000000000000000000000000000000000000..14118fc5aed10434bcc1f81c8c3e89846258570a >--- /dev/null >+++ b/Source/WebCore/inspector/InspectorAuditUtilities.h >@@ -0,0 +1,44 @@ >+/* >+ * Copyright (C) 2019 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#pragma once >+ >+#include <wtf/Ref.h> >+#include <wtf/RefCounted.h> >+ >+namespace WebCore { >+ >+class InspectorAuditUtilities : public RefCounted<InspectorAuditUtilities> { >+public: >+ static Ref<InspectorAuditUtilities> create() >+ { >+ return adoptRef(*new InspectorAuditUtilities()); >+ } >+ >+private: >+ InspectorAuditUtilities(); >+}; >+ >+} // namespace WebCore >diff --git a/Source/WebCore/inspector/InspectorAuditUtilities.idl b/Source/WebCore/inspector/InspectorAuditUtilities.idl >new file mode 100644 >index 0000000000000000000000000000000000000000..cde158604b9583e642cea8e6e0178abffcbfa952 >--- /dev/null >+++ b/Source/WebCore/inspector/InspectorAuditUtilities.idl >@@ -0,0 +1,31 @@ >+/* >+ * Copyright (C) 2019 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+[ >+ ImplementationLacksVTable, >+ JSGenerateToJSObject, >+ NoInterfaceObject, >+] interface InspectorAuditUtilities { >+}; >diff --git a/Source/WebCore/inspector/InspectorController.cpp b/Source/WebCore/inspector/InspectorController.cpp >index 44aa81b2a9bace32f4d871740bd103d1a888e7c4..866210cdb139be888b097dade6a586c2950beca8 100644 >--- a/Source/WebCore/inspector/InspectorController.cpp >+++ b/Source/WebCore/inspector/InspectorController.cpp >@@ -60,6 +60,7 @@ > #include "JSDOMWindowCustom.h" > #include "JSExecState.h" > #include "Page.h" >+#include "PageAuditAgent.h" > #include "PageConsoleAgent.h" > #include "PageDebuggerAgent.h" > #include "PageHeapAgent.h" >@@ -206,6 +207,7 @@ void InspectorController::createLazyAgents() > #if ENABLE(RESOURCE_USAGE) > m_agents.append(std::make_unique<InspectorMemoryAgent>(pageContext)); > #endif >+ m_agents.append(std::make_unique<PageAuditAgent>(pageContext)); > } > > void InspectorController::inspectedPageDestroyed() >diff --git a/Source/WebCore/inspector/WorkerInspectorController.cpp b/Source/WebCore/inspector/WorkerInspectorController.cpp >index d2c023fccc00b0e25a2ad4bd2630dc73c1a5f64f..3597e1b152b944db407a38a4b08f74a542c50ff5 100644 >--- a/Source/WebCore/inspector/WorkerInspectorController.cpp >+++ b/Source/WebCore/inspector/WorkerInspectorController.cpp >@@ -32,6 +32,7 @@ > #include "WebHeapAgent.h" > #include "WebInjectedScriptHost.h" > #include "WebInjectedScriptManager.h" >+#include "WorkerAuditAgent.h" > #include "WorkerConsoleAgent.h" > #include "WorkerDebuggerAgent.h" > #include "WorkerGlobalScope.h" >@@ -168,13 +169,16 @@ void WorkerInspectorController::createLazyAgents() > > m_didCreateLazyAgents = true; > >-#if ENABLE(SERVICE_WORKER) > auto workerContext = workerAgentContext(); >+ >+#if ENABLE(SERVICE_WORKER) > if (is<ServiceWorkerGlobalScope>(m_workerGlobalScope)) { > m_agents.append(std::make_unique<ServiceWorkerAgent>(workerContext)); > m_agents.append(std::make_unique<WorkerNetworkAgent>(workerContext)); > } > #endif >+ >+ m_agents.append(std::make_unique<WorkerAuditAgent>(workerContext)); > } > > InspectorFunctionCallHandler WorkerInspectorController::functionCallHandler() const >diff --git a/Source/WebCore/inspector/agents/page/PageAuditAgent.cpp b/Source/WebCore/inspector/agents/page/PageAuditAgent.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..fc950bfa84c3ae4435375826739beb00bc13eafd >--- /dev/null >+++ b/Source/WebCore/inspector/agents/page/PageAuditAgent.cpp >@@ -0,0 +1,115 @@ >+/* >+ * Copyright (C) 2019 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#include "config.h" >+#include "PageAuditAgent.h" >+ >+#include "InspectorAuditUtilities.h" >+#include "JSInspectorAuditUtilities.h" >+#include "Page.h" >+#include "PageConsoleClient.h" >+#include <JavaScriptCore/CallFrame.h> >+#include <JavaScriptCore/InjectedScript.h> >+#include <JavaScriptCore/InjectedScriptManager.h> >+#include <JavaScriptCore/JSLock.h> >+#include <wtf/Ref.h> >+#include <wtf/RefPtr.h> >+#include <wtf/Vector.h> >+#include <wtf/text/WTFString.h> >+ >+namespace WebCore { >+ >+using namespace Inspector; >+ >+PageAuditAgent::PageAuditAgent(PageAgentContext& context) >+ : InspectorAuditAgent(context) >+ , m_inspectedPage(context.inspectedPage) >+{ >+} >+ >+InjectedScript PageAuditAgent::injectedScriptForEval(const int* executionContextId) >+{ >+ if (executionContextId) >+ return injectedScriptManager().injectedScriptForId(*executionContextId); >+ >+ JSC::ExecState* scriptState = mainWorldExecState(&m_inspectedPage.mainFrame()); >+ return injectedScriptManager().injectedScriptFor(scriptState); >+} >+ >+InjectedScript PageAuditAgent::injectedScriptForEval(ErrorString& errorString, const int* executionContextId) >+{ >+ InjectedScript injectedScript = injectedScriptForEval(executionContextId); >+ if (injectedScript.hasNoValue()) { >+ if (executionContextId) >+ errorString = "Internal error: main world execution context not found."_s; >+ else >+ errorString = "Execution context with given id not found."_s; >+ } >+ return injectedScript; >+} >+ >+Vector<std::pair<String, JSC::JSValue>> PageAuditAgent::runArguments(const int* executionContextId) >+{ >+ auto arguments = InspectorAuditAgent::runArguments(executionContextId); >+ >+ InjectedScript injectedScript = injectedScriptForEval(executionContextId); >+ if (!injectedScript.hasNoValue()) { >+ if (JSC::ExecState* execState = injectedScript.scriptState()) { >+ if (auto* globalObject = JSC::jsCast<JSDOMGlobalObject*>(execState->lexicalGlobalObject())) { >+ if (!m_auditUtilities) >+ m_auditUtilities = InspectorAuditUtilities::create(); >+ >+ JSC::JSValue inspectorAuditUtilities; >+ >+ { >+ JSC::JSLockHolder lock(execState); >+ >+ inspectorAuditUtilities = toJS(execState, globalObject, *m_auditUtilities); >+ } >+ >+ if (inspectorAuditUtilities) >+ arguments.append(std::make_pair("AUDIT"_s, WTFMove(inspectorAuditUtilities))); >+ } >+ } >+ } >+ >+ return arguments; >+} >+ >+void PageAuditAgent::muteConsole() >+{ >+ InspectorAuditAgent::muteConsole(); >+ >+ PageConsoleClient::mute(); >+} >+ >+void PageAuditAgent::unmuteConsole() >+{ >+ PageConsoleClient::unmute(); >+ >+ InspectorAuditAgent::unmuteConsole(); >+} >+ >+} // namespace WebCore >diff --git a/Source/WebCore/inspector/agents/page/PageAuditAgent.h b/Source/WebCore/inspector/agents/page/PageAuditAgent.h >new file mode 100644 >index 0000000000000000000000000000000000000000..5b6adb30095947af7bcbac676d1b6bc4b7c5efe7 >--- /dev/null >+++ b/Source/WebCore/inspector/agents/page/PageAuditAgent.h >@@ -0,0 +1,55 @@ >+/* >+ * Copyright (C) 2019 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#pragma once >+ >+#include "InspectorWebAgentBase.h" >+#include <JavaScriptCore/InspectorAuditAgent.h> >+ >+namespace WebCore { >+ >+class InspectorAuditUtilities; >+class Page; >+ >+class PageAuditAgent final : public Inspector::InspectorAuditAgent { >+ WTF_MAKE_NONCOPYABLE(PageAuditAgent); >+ WTF_MAKE_FAST_ALLOCATED; >+public: >+ explicit PageAuditAgent(PageAgentContext&); >+ >+private: >+ Inspector::InjectedScript injectedScriptForEval(const int* executionContextId); >+ Inspector::InjectedScript injectedScriptForEval(Inspector::ErrorString&, const int* executionContextId) override; >+ >+ Vector<std::pair<String, JSC::JSValue>> runArguments(const int* executionContextId) override; >+ >+ void muteConsole() override; >+ void unmuteConsole() override; >+ >+ Page& m_inspectedPage; >+ RefPtr<InspectorAuditUtilities> m_auditUtilities; >+}; >+ >+} // namespace WebCore >diff --git a/Source/WebCore/inspector/agents/worker/WorkerAuditAgent.cpp b/Source/WebCore/inspector/agents/worker/WorkerAuditAgent.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..854c24553ba991b32fd7a82308d0b56456911a92 >--- /dev/null >+++ b/Source/WebCore/inspector/agents/worker/WorkerAuditAgent.cpp >@@ -0,0 +1,59 @@ >+/* >+ * Copyright (C) 2019 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#include "config.h" >+#include "WorkerAuditAgent.h" >+ >+#include "WorkerGlobalScope.h" >+#include <JavaScriptCore/InjectedScript.h> >+#include <JavaScriptCore/InjectedScriptManager.h> >+#include <JavaScriptCore/JSCInlines.h> >+#include <wtf/Ref.h> >+#include <wtf/RefPtr.h> >+#include <wtf/text/WTFString.h> >+ >+namespace WebCore { >+ >+using namespace Inspector; >+ >+WorkerAuditAgent::WorkerAuditAgent(WorkerAgentContext& context) >+ : InspectorAuditAgent(context) >+ , m_workerGlobalScope(context.workerGlobalScope) >+{ >+ ASSERT(context.workerGlobalScope.isContextThread()); >+} >+ >+InjectedScript WorkerAuditAgent::injectedScriptForEval(ErrorString& errorString, const int* executionContextId) >+{ >+ if (executionContextId) { >+ errorString = "Execution context id is not supported for workers as there is only one execution context."_s; >+ return InjectedScript(); >+ } >+ >+ JSC::ExecState* scriptState = execStateFromWorkerGlobalScope(m_workerGlobalScope); >+ return injectedScriptManager().injectedScriptFor(scriptState); >+} >+ >+} // namespace WebCore >diff --git a/Source/WebCore/inspector/agents/worker/WorkerAuditAgent.h b/Source/WebCore/inspector/agents/worker/WorkerAuditAgent.h >new file mode 100644 >index 0000000000000000000000000000000000000000..1b8d9ff7594154e6cc94c63c42e39288da3e27e3 >--- /dev/null >+++ b/Source/WebCore/inspector/agents/worker/WorkerAuditAgent.h >@@ -0,0 +1,47 @@ >+/* >+ * Copyright (C) 2019 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#pragma once >+ >+#include "InspectorWebAgentBase.h" >+#include <JavaScriptCore/InspectorAuditAgent.h> >+ >+namespace WebCore { >+ >+class WorkerGlobalScope; >+ >+class WorkerAuditAgent final : public Inspector::InspectorAuditAgent { >+ WTF_MAKE_NONCOPYABLE(WorkerAuditAgent); >+ WTF_MAKE_FAST_ALLOCATED; >+public: >+ explicit WorkerAuditAgent(WorkerAgentContext&); >+ >+private: >+ Inspector::InjectedScript injectedScriptForEval(Inspector::ErrorString&, const int* executionContextId) override; >+ >+ WorkerGlobalScope& m_workerGlobalScope; >+}; >+ >+} // namespace WebCore >diff --git a/Source/WebInspectorUI/.eslintrc b/Source/WebInspectorUI/.eslintrc >index 75ea80baeb61d40064d9db5bea7e91c4f4dec0dd..a8c04ddc0627ac05842fd2b00d83fd5631bda40a 100644 >--- a/Source/WebInspectorUI/.eslintrc >+++ b/Source/WebInspectorUI/.eslintrc >@@ -35,6 +35,7 @@ > }, > "globals": { > // Agents >+ "AuditAgent": true, > "ApplicationCacheAgent": true, > "CSSAgent": true, > "CanvasAgent": true, >diff --git a/Source/WebInspectorUI/UserInterface/Models/AuditTestCase.js b/Source/WebInspectorUI/UserInterface/Models/AuditTestCase.js >index a6daef2582bc4e9463c2eb453b15f93a3c7048c8..8fc6581aa772d72bda5d30ff5ee53e4bdbd66a0c 100644 >--- a/Source/WebInspectorUI/UserInterface/Models/AuditTestCase.js >+++ b/Source/WebInspectorUI/UserInterface/Models/AuditTestCase.js >@@ -106,12 +106,6 @@ WI.AuditTestCase = class AuditTestCase extends WI.AuditTestBase > data.errors.push(value); > } > >- let evaluateArguments = { >- expression: `(function() { "use strict"; return eval(${this._test})(); })()`, >- objectGroup: "audit", >- doNotPauseOnExceptionsAndMuteConsole: true, >- }; >- > async function parseResponse(response) { > let remoteObject = WI.RemoteObject.fromPayload(response.result, WI.mainTarget); > if (response.wasThrown || (remoteObject.type === "object" && remoteObject.subtype === "error")) >@@ -232,9 +226,21 @@ WI.AuditTestCase = class AuditTestCase extends WI.AuditTestBase > addError(WI.UIString("Return value is not an object, string, or boolean")); > } > >+ let agentCommandFunction = null; >+ let agentCommandArguments = {}; >+ if (window.AuditAgent) { >+ agentCommandFunction = AuditAgent.run; >+ agentCommandArguments.test = this._test; >+ } else { >+ agentCommandFunction = RuntimeAgent.evaluate; >+ agentCommandArguments.expression = `(function() { "use strict"; return eval(\`(${this._test.replace(/`/g, "\\`")})\`)(); })()`; >+ agentCommandArguments.objectGroup = "audit"; >+ agentCommandArguments.doNotPauseOnExceptionsAndMuteConsole = true; >+ } >+ > try { > metadata.startTimestamp = new Date; >- let response = await RuntimeAgent.evaluate.invoke(evaluateArguments); >+ let response = await agentCommandFunction.invoke(agentCommandArguments); > metadata.endTimestamp = new Date; > > if (response.result.type === "object" && response.result.className === "Promise") { >diff --git a/Source/WebInspectorUI/UserInterface/Protocol/Target.js b/Source/WebInspectorUI/UserInterface/Protocol/Target.js >index dc7995267621b2a6856921c7544ba80c3e88fc22..b0ea5eae2efac2fd48f950014f398db5f52f61cb 100644 >--- a/Source/WebInspectorUI/UserInterface/Protocol/Target.js >+++ b/Source/WebInspectorUI/UserInterface/Protocol/Target.js >@@ -109,6 +109,7 @@ WI.Target = class Target extends WI.Object > > // Agents > >+ get AuditAgent() { return this._agents.Audit; } > get ApplicationCacheAgent() { return this._agents.ApplicationCache; } > get CSSAgent() { return this._agents.CSS; } > get CanvasAgent() { return this._agents.Canvas; } >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 6c934d69ca102d357ac6e6648f09e4b7166575bb..127c2ff91bd6f8b8a27fb428ab66a98a40853812 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,25 @@ >+2019-01-04 Devin Rousso <drousso@apple.com> >+ >+ Web Inspector: Audit: create new IDL type for exposing special functionality in test context >+ https://bugs.webkit.org/show_bug.cgi?id=193149 >+ <rdar://problem/46801218> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * inspector/audit/run.html: Added. >+ * inspector/audit/run-expected.txt: Added. >+ >+ * inspector/canvas/create-context-2d-expected.txt: >+ * inspector/canvas/create-context-bitmaprenderer-expected.txt: >+ * inspector/canvas/create-context-webgl-expected.txt: >+ * inspector/canvas/create-context-webgl2-expected.txt: >+ * inspector/canvas/create-context-webmetal-expected.txt: >+ * inspector/canvas/recording-2d-expected.txt: >+ * inspector/canvas/recording-webgl-expected.txt: >+ * inspector/canvas/recording-webgl-snapshots-expected.txt: >+ * inspector/model/remote-object-expected.txt: >+ * inspector/model/stack-trace-expected.txt: >+ > 2019-01-04 Chris Fleizach <cfleizach@apple.com> > > AX: String check: "Rule" does not reflect the meaning of the <hr> html tag >diff --git a/LayoutTests/inspector/audit/run-expected.txt b/LayoutTests/inspector/audit/run-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..d7da763d2bc5dc5d6d7a04fd24d0a51cbf0c71d2 >--- /dev/null >+++ b/LayoutTests/inspector/audit/run-expected.txt >@@ -0,0 +1,13 @@ >+Tests for the Audit.run command. >+ >+ >+== Running test suite: Audit.run >+-- Running test case: Audit.run.Valid >+PASS: Run should send back 42. >+ >+-- Running test case: Audit.run.Valid.InjectedObject >+PASS: The injected AUDIT should be an instance of InspectorAuditUtilities. >+ >+-- Running test case: Audit.run.Invalid >+TypeError: eval(`(42)`) is not a function. (In 'eval(`(42)`)()', 'eval(`(42)`)' is 42) >+ >diff --git a/LayoutTests/inspector/audit/run.html b/LayoutTests/inspector/audit/run.html >new file mode 100644 >index 0000000000000000000000000000000000000000..1c5776a600e3c02f3e95204fff6d19fc65dea0c3 >--- /dev/null >+++ b/LayoutTests/inspector/audit/run.html >@@ -0,0 +1,60 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<script src="../../http/tests/inspector/resources/inspector-test.js"></script> >+<script> >+ >+function test() >+{ >+ let suite = InspectorTest.createAsyncSuite("Audit.run"); >+ >+ suite.addTestCase({ >+ name: "Audit.run.Valid", >+ description: "Check that Audit.run is able to respond with a RemoteObject.", >+ async test() { >+ const functionString = `function() { return 42; }`; >+ let {result, wasThrown} = await AuditAgent.run(functionString); >+ InspectorTest.assert(!wasThrown, "Should not throw an exception."); >+ if (!wasThrown) >+ InspectorTest.expectEqual(result.value, 42, "Run should send back 42."); >+ else >+ InspectorTest.log(result); >+ }, >+ }); >+ >+ suite.addTestCase({ >+ name: "Audit.run.Valid.InjectedObject", >+ description: "Check that an InspectorAuditUtilities object is injected into the function that is executed.", >+ async test() { >+ const functionString = `function() { return AUDIT; }`; >+ let {result, wasThrown} = await AuditAgent.run(functionString); >+ InspectorTest.assert(!wasThrown, "Should not throw an exception."); >+ if (!wasThrown) >+ InspectorTest.expectEqual(result.description, "InspectorAuditUtilities", "The injected AUDIT should be an instance of InspectorAuditUtilities."); >+ else >+ InspectorTest.log(result); >+ }, >+ }); >+ >+ suite.addTestCase({ >+ name: "Audit.run.Invalid", >+ description: "Check that an error is thrown when trying to execute a non-function.", >+ async test() { >+ const functionString = `42`; >+ let {result, wasThrown} = await AuditAgent.run(functionString); >+ InspectorTest.assert(wasThrown, "Should throw an exception."); >+ if (wasThrown) >+ InspectorTest.log(result.description); >+ else >+ InspectorTest.log(result); >+ }, >+ }); >+ >+ suite.runTestCasesAndFinish(); >+} >+</script> >+</head> >+<body onload="runTest()"> >+ <p>Tests for the Audit.run command.</p> >+</body> >+</html> >diff --git a/LayoutTests/inspector/canvas/create-context-2d-expected.txt b/LayoutTests/inspector/canvas/create-context-2d-expected.txt >index f3c8b75eb5675e329c3b2f24689002813ac616b0..0e8c224cee578f49a07e3f1b847b1eea62e394e7 100644 >--- a/LayoutTests/inspector/canvas/create-context-2d-expected.txt >+++ b/LayoutTests/inspector/canvas/create-context-2d-expected.txt >@@ -11,8 +11,8 @@ PASS: Canvas context should be 2D. > 1: createAttachedCanvas - inspector/canvas/resources/create-context-utilities.js:4:36 > 2: Global Code - [program code] > 3: evaluateWithScopeExtension - [native code] >- 4: _evaluateOn - [native code] >- 5: _evaluateAndWrap - [native code] >+ 4: (anonymous function) - [native code] >+ 5: _wrapCall - [native code] > > PASS: Removed canvas has expected ID. > >@@ -22,8 +22,8 @@ PASS: Canvas context should be 2D. > 1: createDetachedCanvas - inspector/canvas/resources/create-context-utilities.js:8:62 > 2: Global Code - [program code] > 3: evaluateWithScopeExtension - [native code] >- 4: _evaluateOn - [native code] >- 5: _evaluateAndWrap - [native code] >+ 4: (anonymous function) - [native code] >+ 5: _wrapCall - [native code] > > PASS: Removed canvas has expected ID. > >@@ -34,8 +34,8 @@ PASS: Canvas context should be 2D. > 1: createCSSCanvas - inspector/canvas/resources/create-context-utilities.js:12:47 > 2: Global Code - [program code] > 3: evaluateWithScopeExtension - [native code] >- 4: _evaluateOn - [native code] >- 5: _evaluateAndWrap - [native code] >+ 4: (anonymous function) - [native code] >+ 5: _wrapCall - [native code] > > PASS: Canvas name should equal the identifier passed to -webkit-canvas. > >diff --git a/LayoutTests/inspector/canvas/create-context-bitmaprenderer-expected.txt b/LayoutTests/inspector/canvas/create-context-bitmaprenderer-expected.txt >index 8adada03ceeb93b6251f3850469a3ec1fa90eb8d..33d8a86953b6c5a6b792f557a5ce3c490ef1d2fc 100644 >--- a/LayoutTests/inspector/canvas/create-context-bitmaprenderer-expected.txt >+++ b/LayoutTests/inspector/canvas/create-context-bitmaprenderer-expected.txt >@@ -11,8 +11,8 @@ PASS: Canvas context should be Bitmap Renderer. > 1: createAttachedCanvas - inspector/canvas/resources/create-context-utilities.js:4:36 > 2: Global Code - [program code] > 3: evaluateWithScopeExtension - [native code] >- 4: _evaluateOn - [native code] >- 5: _evaluateAndWrap - [native code] >+ 4: (anonymous function) - [native code] >+ 5: _wrapCall - [native code] > > PASS: Removed canvas has expected ID. > >@@ -22,8 +22,8 @@ PASS: Canvas context should be Bitmap Renderer. > 1: createDetachedCanvas - inspector/canvas/resources/create-context-utilities.js:8:62 > 2: Global Code - [program code] > 3: evaluateWithScopeExtension - [native code] >- 4: _evaluateOn - [native code] >- 5: _evaluateAndWrap - [native code] >+ 4: (anonymous function) - [native code] >+ 5: _wrapCall - [native code] > > PASS: Removed canvas has expected ID. > >diff --git a/LayoutTests/inspector/canvas/create-context-webgl-expected.txt b/LayoutTests/inspector/canvas/create-context-webgl-expected.txt >index 4fa944002740e5bedccdcf855978e0d566cfe1da..b84c3114557b17d6b62fa2e3289a29f0ae95f04e 100644 >--- a/LayoutTests/inspector/canvas/create-context-webgl-expected.txt >+++ b/LayoutTests/inspector/canvas/create-context-webgl-expected.txt >@@ -11,8 +11,8 @@ PASS: Canvas context should be WebGL. > 1: createAttachedCanvas - inspector/canvas/resources/create-context-utilities.js:4:36 > 2: Global Code - [program code] > 3: evaluateWithScopeExtension - [native code] >- 4: _evaluateOn - [native code] >- 5: _evaluateAndWrap - [native code] >+ 4: (anonymous function) - [native code] >+ 5: _wrapCall - [native code] > > PASS: Removed canvas has expected ID. > >@@ -22,8 +22,8 @@ PASS: Canvas context should be WebGL. > 1: createDetachedCanvas - inspector/canvas/resources/create-context-utilities.js:8:62 > 2: Global Code - [program code] > 3: evaluateWithScopeExtension - [native code] >- 4: _evaluateOn - [native code] >- 5: _evaluateAndWrap - [native code] >+ 4: (anonymous function) - [native code] >+ 5: _wrapCall - [native code] > > PASS: Removed canvas has expected ID. > >@@ -34,8 +34,8 @@ PASS: Canvas context should be WebGL. > 1: createCSSCanvas - inspector/canvas/resources/create-context-utilities.js:12:47 > 2: Global Code - [program code] > 3: evaluateWithScopeExtension - [native code] >- 4: _evaluateOn - [native code] >- 5: _evaluateAndWrap - [native code] >+ 4: (anonymous function) - [native code] >+ 5: _wrapCall - [native code] > > PASS: Canvas name should equal the identifier passed to -webkit-canvas. > >diff --git a/LayoutTests/inspector/canvas/create-context-webgl2-expected.txt b/LayoutTests/inspector/canvas/create-context-webgl2-expected.txt >index e02d886ac35af4d41804e6e42a364326c116df8e..a3d700b1a52a8599e7ac80f7c7c267e2faac51a0 100644 >--- a/LayoutTests/inspector/canvas/create-context-webgl2-expected.txt >+++ b/LayoutTests/inspector/canvas/create-context-webgl2-expected.txt >@@ -11,8 +11,8 @@ PASS: Canvas context should be WebGL2. > 1: createAttachedCanvas - inspector/canvas/resources/create-context-utilities.js:4:36 > 2: Global Code - [program code] > 3: evaluateWithScopeExtension - [native code] >- 4: _evaluateOn - [native code] >- 5: _evaluateAndWrap - [native code] >+ 4: (anonymous function) - [native code] >+ 5: _wrapCall - [native code] > > PASS: Removed canvas has expected ID. > >@@ -22,8 +22,8 @@ PASS: Canvas context should be WebGL2. > 1: createDetachedCanvas - inspector/canvas/resources/create-context-utilities.js:8:62 > 2: Global Code - [program code] > 3: evaluateWithScopeExtension - [native code] >- 4: _evaluateOn - [native code] >- 5: _evaluateAndWrap - [native code] >+ 4: (anonymous function) - [native code] >+ 5: _wrapCall - [native code] > > PASS: Removed canvas has expected ID. > >@@ -34,8 +34,8 @@ PASS: Canvas context should be WebGL2. > 1: createCSSCanvas - inspector/canvas/resources/create-context-utilities.js:12:47 > 2: Global Code - [program code] > 3: evaluateWithScopeExtension - [native code] >- 4: _evaluateOn - [native code] >- 5: _evaluateAndWrap - [native code] >+ 4: (anonymous function) - [native code] >+ 5: _wrapCall - [native code] > > PASS: Canvas name should equal the identifier passed to -webkit-canvas. > >diff --git a/LayoutTests/inspector/canvas/create-context-webmetal-expected.txt b/LayoutTests/inspector/canvas/create-context-webmetal-expected.txt >index 4534719c296f90051bc0f48d3b046d35b96e089f..4e663ffaa3e0a9d7116ff93f35b0f0e206969b0c 100644 >--- a/LayoutTests/inspector/canvas/create-context-webmetal-expected.txt >+++ b/LayoutTests/inspector/canvas/create-context-webmetal-expected.txt >@@ -11,8 +11,8 @@ PASS: Canvas context should be WebMetal. > 1: createAttachedCanvas - inspector/canvas/resources/create-context-utilities.js:4:36 > 2: Global Code - [program code] > 3: evaluateWithScopeExtension - [native code] >- 4: _evaluateOn - [native code] >- 5: _evaluateAndWrap - [native code] >+ 4: (anonymous function) - [native code] >+ 5: _wrapCall - [native code] > > PASS: Removed canvas has expected ID. > >@@ -22,7 +22,7 @@ PASS: Canvas context should be WebMetal. > 1: createDetachedCanvas - inspector/canvas/resources/create-context-utilities.js:8:62 > 2: Global Code - [program code] > 3: evaluateWithScopeExtension - [native code] >- 4: _evaluateOn - [native code] >+ 4: (anonymous function) - [native code] > 5: _evaluateAndWrap - [native code] > > PASS: Removed canvas has expected ID. >@@ -34,7 +34,7 @@ PASS: Canvas context should be WebMetal. > 1: createCSSCanvas - inspector/canvas/resources/create-context-utilities.js:12:47 > 2: Global Code - [program code] > 3: evaluateWithScopeExtension - [native code] >- 4: _evaluateOn - [native code] >+ 4: (anonymous function) - [native code] > 5: _evaluateAndWrap - [native code] > > PASS: Canvas name should equal the identifier passed to -webkit-canvas. >diff --git a/LayoutTests/inspector/canvas/recording-2d-expected.txt b/LayoutTests/inspector/canvas/recording-2d-expected.txt >index 082f21d184a5bd50b5f5a0946a6926d373a83a6e..ce92ca7999d3cca291ebe2906a438c711998aedf 100644 >--- a/LayoutTests/inspector/canvas/recording-2d-expected.txt >+++ b/LayoutTests/inspector/canvas/recording-2d-expected.txt >@@ -45,8 +45,8 @@ frames: > 5: performActions > 6: Global Code > 7: evaluateWithScopeExtension >- 8: _evaluateOn >- 9: _evaluateAndWrap >+ 8: (anonymous function) >+ 9: _wrapCall > 1: arc(6, 7, 8, 9, 10, true) > swizzleTypes: [Number, Number, Number, Number, Number, Boolean] > trace: >@@ -58,8 +58,8 @@ frames: > 5: performActions > 6: Global Code > 7: evaluateWithScopeExtension >- 8: _evaluateOn >- 9: _evaluateAndWrap >+ 8: (anonymous function) >+ 9: _wrapCall > > -- Running test case: Canvas.recording2D.multipleFrames > initialState: >@@ -104,8 +104,8 @@ frames: > 5: performActions > 6: Global Code > 7: evaluateWithScopeExtension >- 8: _evaluateOn >- 9: _evaluateAndWrap >+ 8: (anonymous function) >+ 9: _wrapCall > 1: arc(6, 7, 8, 9, 10, true) > swizzleTypes: [Number, Number, Number, Number, Number, Boolean] > trace: >@@ -117,8 +117,8 @@ frames: > 5: performActions > 6: Global Code > 7: evaluateWithScopeExtension >- 8: _evaluateOn >- 9: _evaluateAndWrap >+ 8: (anonymous function) >+ 9: _wrapCall > 1: (duration) > 0: arcTo(1, 2, 3, 4, 5) > swizzleTypes: [Number, Number, Number, Number, Number] >@@ -1131,8 +1131,8 @@ frames: > 5: performActions > 6: Global Code > 7: evaluateWithScopeExtension >- 8: _evaluateOn >- 9: _evaluateAndWrap >+ 8: (anonymous function) >+ 9: _wrapCall > > -- Running test case: Canvas.recording2D.Console > PASS: The recording should have the name "TEST". >diff --git a/LayoutTests/inspector/canvas/recording-webgl-expected.txt b/LayoutTests/inspector/canvas/recording-webgl-expected.txt >index d8bc49cee10c874f995989e04c4537bb1398b5b2..77781406ebb8b929809a0228ee4250332d092245 100644 >--- a/LayoutTests/inspector/canvas/recording-webgl-expected.txt >+++ b/LayoutTests/inspector/canvas/recording-webgl-expected.txt >@@ -21,8 +21,8 @@ frames: > 3: performActions > 4: Global Code > 5: evaluateWithScopeExtension >- 6: _evaluateOn >- 7: _evaluateAndWrap >+ 6: (anonymous function) >+ 7: _wrapCall > > -- Running test case: Canvas.recordingWebGL.multipleFrames > initialState: >@@ -43,7 +43,7 @@ frames: > 3: performActions > 4: Global Code > 5: evaluateWithScopeExtension >- 6: _evaluateOn >+ 6: (anonymous function) > 7: _evaluateAndWrap > 1: (duration) > 0: attachShader(0, 0) >@@ -1046,7 +1046,7 @@ frames: > 3: performActions > 4: Global Code > 5: evaluateWithScopeExtension >- 6: _evaluateOn >+ 6: (anonymous function) > 7: _evaluateAndWrap > > -- Running test case: Canvas.recordingWebGL.Console >diff --git a/LayoutTests/inspector/canvas/recording-webgl-snapshots-expected.txt b/LayoutTests/inspector/canvas/recording-webgl-snapshots-expected.txt >index 51cfda8add05fa785041a676f1a61aabc603e52b..a41ca61f5e61e082f9f9a7e52a57d0ccc6372e6c 100644 >--- a/LayoutTests/inspector/canvas/recording-webgl-snapshots-expected.txt >+++ b/LayoutTests/inspector/canvas/recording-webgl-snapshots-expected.txt >@@ -19,7 +19,7 @@ frames: > 1: performActions > 2: Global Code > 3: evaluateWithScopeExtension >- 4: _evaluateOn >+ 4: (anonymous function) > 5: _evaluateAndWrap > 1: clearColor(0, 0, 0, 1) > swizzleTypes: [Number, Number, Number, Number] >@@ -29,7 +29,7 @@ frames: > 2: performActions > 3: Global Code > 4: evaluateWithScopeExtension >- 5: _evaluateOn >+ 5: (anonymous function) > 6: _evaluateAndWrap > 2: clear(16384) > swizzleTypes: [Number] >@@ -39,7 +39,7 @@ frames: > 2: performActions > 3: Global Code > 4: evaluateWithScopeExtension >- 5: _evaluateOn >+ 5: (anonymous function) > 6: _evaluateAndWrap > snapshot: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAACWCAYAAABkW7XSAAAAAXNSR0IArs4c6QAABGxJREFUeAHt1MEJwDAMBEHF/fec5OEitDAG/485cc/MvP/3CBAgsF7grE8oIAECBK6AwXIKBAhkBAxWpipBCRAwWG6AAIGMgMHKVCUoAQIGyw0QIJARMFiZqgQlQMBguQECBDICBitTlaAECBgsN0CAQEbAYGWqEpQAAYPlBggQyAgYrExVghIgYLDcAAECGQGDlalKUAIEDJYbIEAgI2CwMlUJSoCAwXIDBAhkBAxWpipBCRAwWG6AAIGMgMHKVCUoAQIGyw0QIJARMFiZqgQlQMBguQECBDICBitTlaAECBgsN0CAQEbAYGWqEpQAAYPlBggQyAgYrExVghIgYLDcAAECGQGDlalKUAIEDJYbIEAgI2CwMlUJSoCAwXIDBAhkBAxWpipBCRAwWG6AAIGMgMHKVCUoAQIGyw0QIJARMFiZqgQlQMBguQECBDICBitTlaAECBgsN0CAQEbAYGWqEpQAAYPlBggQyAgYrExVghIgYLDcAAECGQGDlalKUAIEDJYbIEAgI2CwMlUJSoCAwXIDBAhkBAxWpipBCRAwWG6AAIGMgMHKVCUoAQIGyw0QIJARMFiZqgQlQMBguQECBDICBitTlaAECBgsN0CAQEbAYGWqEpQAAYPlBggQyAgYrExVghIgYLDcAAECGQGDlalKUAIEDJYbIEAgI2CwMlUJSoCAwXIDBAhkBAxWpipBCRAwWG6AAIGMgMHKVCUoAQIGyw0QIJARMFiZqgQlQMBguQECBDICBitTlaAECBgsN0CAQEbAYGWqEpQAAYPlBggQyAgYrExVghIgYLDcAAECGQGDlalKUAIEDJYbIEAgI2CwMlUJSoCAwXIDBAhkBAxWpipBCRAwWG6AAIGMgMHKVCUoAQIGyw0QIJARMFiZqgQlQMBguQECBDICBitTlaAECBgsN0CAQEbAYGWqEpQAAYPlBggQyAgYrExVghIgYLDcAAECGQGDlalKUAIEDJYbIEAgI2CwMlUJSoCAwXIDBAhkBAxWpipBCRAwWG6AAIGMgMHKVCUoAQIGyw0QIJARMFiZqgQlQMBguQECBDICBitTlaAECBgsN0CAQEbAYGWqEpQAAYPlBggQyAgYrExVghIgYLDcAAECGQGDlalKUAIEDJYbIEAgI2CwMlUJSoCAwXIDBAhkBAxWpipBCRAwWG6AAIGMgMHKVCUoAQIGyw0QIJARMFiZqgQlQMBguQECBDICBitTlaAECBgsN0CAQEbAYGWqEpQAAYPlBggQyAgYrExVghIgYLDcAAECGQGDlalKUAIEDJYbIEAgI2CwMlUJSoCAwXIDBAhkBAxWpipBCRAwWG6AAIGMgMHKVCUoAQIGyw0QIJARMFiZqgQlQMBguQECBDICBitTlaAECBgsN0CAQEbAYGWqEpQAAYPlBggQyAgYrExVghIgYLDcAAECGQGDlalKUAIEDJYbIEAgI2CwMlUJSoCAwXIDBAhkBAxWpipBCRAwWG6AAIGMgMHKVCUoAQIfSAwCK2+QFXIAAAAASUVORK5CYII=" > 3: bufferData(34962, 0, 35044) >@@ -50,7 +50,7 @@ frames: > 2: performActions > 3: Global Code > 4: evaluateWithScopeExtension >- 5: _evaluateOn >+ 5: (anonymous function) > 6: _evaluateAndWrap > 4: drawArrays(4, 0, 3) > swizzleTypes: [Number, Number, Number] >@@ -60,7 +60,7 @@ frames: > 2: performActions > 3: Global Code > 4: evaluateWithScopeExtension >- 5: _evaluateOn >+ 5: (anonymous function) > 6: _evaluateAndWrap > snapshot: "data:image/png;base64,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" > 5: clearColor(0, 0, 0, 1) >@@ -71,7 +71,7 @@ frames: > 2: performActions > 3: Global Code > 4: evaluateWithScopeExtension >- 5: _evaluateOn >+ 5: (anonymous function) > 6: _evaluateAndWrap > 6: clear(16384) > swizzleTypes: [Number] >@@ -81,7 +81,7 @@ frames: > 2: performActions > 3: Global Code > 4: evaluateWithScopeExtension >- 5: _evaluateOn >+ 5: (anonymous function) > 6: _evaluateAndWrap > snapshot: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAACWCAYAAABkW7XSAAAAAXNSR0IArs4c6QAABGxJREFUeAHt1MEJwDAMBEHF/fec5OEitDAG/485cc/MvP/3CBAgsF7grE8oIAECBK6AwXIKBAhkBAxWpipBCRAwWG6AAIGMgMHKVCUoAQIGyw0QIJARMFiZqgQlQMBguQECBDICBitTlaAECBgsN0CAQEbAYGWqEpQAAYPlBggQyAgYrExVghIgYLDcAAECGQGDlalKUAIEDJYbIEAgI2CwMlUJSoCAwXIDBAhkBAxWpipBCRAwWG6AAIGMgMHKVCUoAQIGyw0QIJARMFiZqgQlQMBguQECBDICBitTlaAECBgsN0CAQEbAYGWqEpQAAYPlBggQyAgYrExVghIgYLDcAAECGQGDlalKUAIEDJYbIEAgI2CwMlUJSoCAwXIDBAhkBAxWpipBCRAwWG6AAIGMgMHKVCUoAQIGyw0QIJARMFiZqgQlQMBguQECBDICBitTlaAECBgsN0CAQEbAYGWqEpQAAYPlBggQyAgYrExVghIgYLDcAAECGQGDlalKUAIEDJYbIEAgI2CwMlUJSoCAwXIDBAhkBAxWpipBCRAwWG6AAIGMgMHKVCUoAQIGyw0QIJARMFiZqgQlQMBguQECBDICBitTlaAECBgsN0CAQEbAYGWqEpQAAYPlBggQyAgYrExVghIgYLDcAAECGQGDlalKUAIEDJYbIEAgI2CwMlUJSoCAwXIDBAhkBAxWpipBCRAwWG6AAIGMgMHKVCUoAQIGyw0QIJARMFiZqgQlQMBguQECBDICBitTlaAECBgsN0CAQEbAYGWqEpQAAYPlBggQyAgYrExVghIgYLDcAAECGQGDlalKUAIEDJYbIEAgI2CwMlUJSoCAwXIDBAhkBAxWpipBCRAwWG6AAIGMgMHKVCUoAQIGyw0QIJARMFiZqgQlQMBguQECBDICBitTlaAECBgsN0CAQEbAYGWqEpQAAYPlBggQyAgYrExVghIgYLDcAAECGQGDlalKUAIEDJYbIEAgI2CwMlUJSoCAwXIDBAhkBAxWpipBCRAwWG6AAIGMgMHKVCUoAQIGyw0QIJARMFiZqgQlQMBguQECBDICBitTlaAECBgsN0CAQEbAYGWqEpQAAYPlBggQyAgYrExVghIgYLDcAAECGQGDlalKUAIEDJYbIEAgI2CwMlUJSoCAwXIDBAhkBAxWpipBCRAwWG6AAIGMgMHKVCUoAQIGyw0QIJARMFiZqgQlQMBguQECBDICBitTlaAECBgsN0CAQEbAYGWqEpQAAYPlBggQyAgYrExVghIgYLDcAAECGQGDlalKUAIEDJYbIEAgI2CwMlUJSoCAwXIDBAhkBAxWpipBCRAwWG6AAIGMgMHKVCUoAQIGyw0QIJARMFiZqgQlQMBguQECBDICBitTlaAECBgsN0CAQEbAYGWqEpQAAYPlBggQyAgYrExVghIgYLDcAAECGQGDlalKUAIEDJYbIEAgI2CwMlUJSoCAwXIDBAhkBAxWpipBCRAwWG6AAIGMgMHKVCUoAQIfSAwCK2+QFXIAAAAASUVORK5CYII=" > 7: bufferData(34962, 0, 35044) >@@ -92,7 +92,7 @@ frames: > 2: performActions > 3: Global Code > 4: evaluateWithScopeExtension >- 5: _evaluateOn >+ 5: (anonymous function) > 6: _evaluateAndWrap > 8: bufferData(34963, 0, 35044) > swizzleTypes: [Number, TypedArray, Number] >@@ -102,7 +102,7 @@ frames: > 2: performActions > 3: Global Code > 4: evaluateWithScopeExtension >- 5: _evaluateOn >+ 5: (anonymous function) > 6: _evaluateAndWrap > 9: drawElements(4, 3, 5123, 0) > swizzleTypes: [Number, Number, Number, Number] >@@ -112,8 +112,8 @@ frames: > 2: performActions > 3: Global Code > 4: evaluateWithScopeExtension >- 5: _evaluateOn >- 6: _evaluateAndWrap >+ 5: (anonymous function) >+ 6: _wrapCall > snapshot: "data:image/png;base64,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" > 10: clearColor(0, 0, 0, 1) > swizzleTypes: [Number, Number, Number, Number] >@@ -123,7 +123,7 @@ frames: > 2: performActions > 3: Global Code > 4: evaluateWithScopeExtension >- 5: _evaluateOn >+ 5: (anonymous function) > 6: _evaluateAndWrap > 11: clear(16384) > swizzleTypes: [Number] >@@ -133,7 +133,7 @@ frames: > 2: performActions > 3: Global Code > 4: evaluateWithScopeExtension >- 5: _evaluateOn >+ 5: (anonymous function) > 6: _evaluateAndWrap > snapshot: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAACWCAYAAABkW7XSAAAAAXNSR0IArs4c6QAABGxJREFUeAHt1MEJwDAMBEHF/fec5OEitDAG/485cc/MvP/3CBAgsF7grE8oIAECBK6AwXIKBAhkBAxWpipBCRAwWG6AAIGMgMHKVCUoAQIGyw0QIJARMFiZqgQlQMBguQECBDICBitTlaAECBgsN0CAQEbAYGWqEpQAAYPlBggQyAgYrExVghIgYLDcAAECGQGDlalKUAIEDJYbIEAgI2CwMlUJSoCAwXIDBAhkBAxWpipBCRAwWG6AAIGMgMHKVCUoAQIGyw0QIJARMFiZqgQlQMBguQECBDICBitTlaAECBgsN0CAQEbAYGWqEpQAAYPlBggQyAgYrExVghIgYLDcAAECGQGDlalKUAIEDJYbIEAgI2CwMlUJSoCAwXIDBAhkBAxWpipBCRAwWG6AAIGMgMHKVCUoAQIGyw0QIJARMFiZqgQlQMBguQECBDICBitTlaAECBgsN0CAQEbAYGWqEpQAAYPlBggQyAgYrExVghIgYLDcAAECGQGDlalKUAIEDJYbIEAgI2CwMlUJSoCAwXIDBAhkBAxWpipBCRAwWG6AAIGMgMHKVCUoAQIGyw0QIJARMFiZqgQlQMBguQECBDICBitTlaAECBgsN0CAQEbAYGWqEpQAAYPlBggQyAgYrExVghIgYLDcAAECGQGDlalKUAIEDJYbIEAgI2CwMlUJSoCAwXIDBAhkBAxWpipBCRAwWG6AAIGMgMHKVCUoAQIGyw0QIJARMFiZqgQlQMBguQECBDICBitTlaAECBgsN0CAQEbAYGWqEpQAAYPlBggQyAgYrExVghIgYLDcAAECGQGDlalKUAIEDJYbIEAgI2CwMlUJSoCAwXIDBAhkBAxWpipBCRAwWG6AAIGMgMHKVCUoAQIGyw0QIJARMFiZqgQlQMBguQECBDICBitTlaAECBgsN0CAQEbAYGWqEpQAAYPlBggQyAgYrExVghIgYLDcAAECGQGDlalKUAIEDJYbIEAgI2CwMlUJSoCAwXIDBAhkBAxWpipBCRAwWG6AAIGMgMHKVCUoAQIGyw0QIJARMFiZqgQlQMBguQECBDICBitTlaAECBgsN0CAQEbAYGWqEpQAAYPlBggQyAgYrExVghIgYLDcAAECGQGDlalKUAIEDJYbIEAgI2CwMlUJSoCAwXIDBAhkBAxWpipBCRAwWG6AAIGMgMHKVCUoAQIGyw0QIJARMFiZqgQlQMBguQECBDICBitTlaAECBgsN0CAQEbAYGWqEpQAAYPlBggQyAgYrExVghIgYLDcAAECGQGDlalKUAIEDJYbIEAgI2CwMlUJSoCAwXIDBAhkBAxWpipBCRAwWG6AAIGMgMHKVCUoAQIGyw0QIJARMFiZqgQlQMBguQECBDICBitTlaAECBgsN0CAQEbAYGWqEpQAAYPlBggQyAgYrExVghIgYLDcAAECGQGDlalKUAIEDJYbIEAgI2CwMlUJSoCAwXIDBAhkBAxWpipBCRAwWG6AAIGMgMHKVCUoAQIfSAwCK2+QFXIAAAAASUVORK5CYII=" > >diff --git a/LayoutTests/inspector/model/remote-object-expected.txt b/LayoutTests/inspector/model/remote-object-expected.txt >index 37de7f92814e5e7d38c8018c0f2347261de4217e..282039f3b7c4383fabe428a1a625002486886d5e 100644 >--- a/LayoutTests/inspector/model/remote-object-expected.txt >+++ b/LayoutTests/inspector/model/remote-object-expected.txt >@@ -1656,7 +1656,7 @@ EXPRESSION: error = null; try { [].x.x; } catch (e) { error = e; }; error > { > "_name": "stack", > "_type": "string", >- "_value": "global code\nevaluateWithScopeExtension@[native code]\n_evaluateOn\n_evaluateAndWrap" >+ "_value": "global code\nevaluateWithScopeExtension@[native code]\n(anonymous function)\n_wrapCall" > } > ], > "_entries": null >@@ -1695,7 +1695,7 @@ EXPRESSION: error = null; try { eval("if()"); } catch (e) { error = e; }; error > { > "_name": "stack", > "_type": "string", >- "_value": "eval@[native code]\nglobal code\nevaluateWithScopeExtension@[native code]\n_evaluateOn\n_evaluateAndWrap" >+ "_value": "eval@[native code]\nglobal code\nevaluateWithScopeExtension@[native code]\n(anonymous function)\n_wrapCall" > } > ], > "_entries": null >@@ -1729,7 +1729,7 @@ EXPRESSION: error = null; try { document.createTextNode("").splitText(100); } ca > { > "_name": "stack", > "_type": "string", >- "_value": "splitText@[native code]\nglobal code\nevaluateWithScâ¦ension@[native code]\n_evaluateOn\n_evaluateAndWrap" >+ "_value": "splitText@[native code]\nglobal code\nevaluateWithScâ¦ension@[native code]\n(anonymous function)\n_wrapCall" > }, > { > "_name": "code", >diff --git a/LayoutTests/inspector/model/stack-trace-expected.txt b/LayoutTests/inspector/model/stack-trace-expected.txt >index 28de476b37f97f1ec6a8f0fe9097ca8e357fe248..87a5451deb2ce8a2d1414317a7099bd68500d646 100644 >--- a/LayoutTests/inspector/model/stack-trace-expected.txt >+++ b/LayoutTests/inspector/model/stack-trace-expected.txt >@@ -17,6 +17,6 @@ StackTrace: 10 > 6: triggerConsoleMessage (stack-trace.html:9) - nativeCode (false) programCode (false) > 7: Global Code (Anonymous Script 2 (line 1)) - nativeCode (false) programCode (true) > 8: evaluateWithScopeExtension - nativeCode (true) programCode (false) >- 9: _evaluateOn - nativeCode (true) programCode (false) >- 10: _evaluateAndWrap - nativeCode (true) programCode (false) >+ 9: (anonymous function) - nativeCode (true) programCode (false) >+ 10: _wrapCall - nativeCode (true) programCode (false) >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 193149
:
358347
|
358357
|
358359
|
358375
|
358380
|
358394
|
358400
|
358409
|
358422
|
358462
|
358467
|
358843
|
359007
|
359118
|
359120
|
359124
|
359132
|
359139