WebKit Bugzilla
Attachment 359544 Details for
Bug 193594
: Web Inspector: Audit: don't keep the injected sub-objects alive between runs
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-193594-20190118151018.patch (text/plain), 3.83 KB, created by
Devin Rousso
on 2019-01-18 15:10:19 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Devin Rousso
Created:
2019-01-18 15:10:19 PST
Size:
3.83 KB
patch
obsolete
>diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 088803b78eb67f7472e7b9e25209a47d6902c9ef..843552e6e6a3e5b680101215641761858672b133 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,21 @@ >+2019-01-18 Devin Rousso <drousso@apple.com> >+ >+ Web Inspector: Audit: don't keep the injected sub-objects alive between runs >+ https://bugs.webkit.org/show_bug.cgi?id=193594 >+ <rdar://problem/47398091> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Rather than save the `InspectorAuditAccessibilityObject` and `InspectorAuditDOMObject` >+ between individual `Audit.setup` invocations, we should only keep them alive so long as the >+ injected `WebInspectorAudit` object is alive (e.g. from `Audit.setup` to `Audit.teardown`). >+ >+ This change fixes inspector/audit/run-accessibility.html. >+ >+ * inspector/agents/page/PageAuditAgent.h: >+ * inspector/agents/page/PageAuditAgent.cpp: >+ (WebCore::PageAuditAgent::populateAuditObject): >+ > 2019-01-17 Jiewen Tan <jiewen_tan@apple.com> > > [Mac] Add a new quirk to HTMLFormControlElement::isMouseFocusable >diff --git a/Source/WebCore/inspector/agents/page/PageAuditAgent.cpp b/Source/WebCore/inspector/agents/page/PageAuditAgent.cpp >index 9172b6ca81cd5619d1e41d8186d0236fbf7e3b19..141ec08e32cb1eae71f3d535a8294c8a16cfe612 100644 >--- a/Source/WebCore/inspector/agents/page/PageAuditAgent.cpp >+++ b/Source/WebCore/inspector/agents/page/PageAuditAgent.cpp >@@ -26,6 +26,8 @@ > #include "config.h" > #include "PageAuditAgent.h" > >+#include "InspectorAuditAccessibilityObject.h" >+#include "InspectorAuditDOMObject.h" > #include "JSInspectorAuditAccessibilityObject.h" > #include "JSInspectorAuditDOMObject.h" > #include "Page.h" >@@ -81,15 +83,11 @@ void PageAuditAgent::populateAuditObject(JSC::ExecState* execState, JSC::Strong< > if (auto* globalObject = JSC::jsCast<JSDOMGlobalObject*>(execState->lexicalGlobalObject())) { > JSC::JSLockHolder lock(execState); > >-#define ADD_AUDIT_OBJECT(name) \ >- if (!m_audit##name##Object) \ >- m_audit##name##Object = InspectorAudit##name##Object::create(*this); \ >- if (JSC::JSValue inspectorAudit##name##Object = toJS(execState, globalObject, *m_audit##name##Object)) \ >- auditObject->putDirect(execState->vm(), JSC::Identifier::fromString(execState, "" #name ""), inspectorAudit##name##Object); >+ if (JSC::JSValue jsInspectorAuditAccessibilityObject = toJSNewlyCreated(execState, globalObject, InspectorAuditAccessibilityObject::create(*this))) \ >+ auditObject->putDirect(execState->vm(), JSC::Identifier::fromString(execState, "Accessibility"), jsInspectorAuditAccessibilityObject); > >- ADD_AUDIT_OBJECT(Accessibility); >- ADD_AUDIT_OBJECT(DOM); >-#undef ADD_AUDIT_OBJECT >+ if (JSC::JSValue jsInspectorAuditDOMObject = toJSNewlyCreated(execState, globalObject, InspectorAuditDOMObject::create(*this))) \ >+ auditObject->putDirect(execState->vm(), JSC::Identifier::fromString(execState, "DOM"), jsInspectorAuditDOMObject); > } > } > >diff --git a/Source/WebCore/inspector/agents/page/PageAuditAgent.h b/Source/WebCore/inspector/agents/page/PageAuditAgent.h >index b96768f9a06cca3375c0e31993a80b5712fcf782..ac46f4fec3ca179fa280a7e04e65efbaf98eb071 100644 >--- a/Source/WebCore/inspector/agents/page/PageAuditAgent.h >+++ b/Source/WebCore/inspector/agents/page/PageAuditAgent.h >@@ -25,8 +25,6 @@ > > #pragma once > >-#include "InspectorAuditAccessibilityObject.h" >-#include "InspectorAuditDOMObject.h" > #include "InspectorWebAgentBase.h" > #include <JavaScriptCore/InspectorAuditAgent.h> > >@@ -50,8 +48,6 @@ private: > void unmuteConsole() override; > > Page& m_inspectedPage; >- RefPtr<InspectorAuditAccessibilityObject> m_auditAccessibilityObject; >- RefPtr<InspectorAuditDOMObject> m_auditDOMObject; > }; > > } // namespace WebCore
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 193594
: 359544