Title: [196454] trunk/Source/_javascript_Core
- Revision
- 196454
- Author
- [email protected]
- Date
- 2016-02-11 16:02:29 -0800 (Thu, 11 Feb 2016)
Log Message
Web Inspector: RemoteInspector's listings should include whether an AutomationTarget is paired
https://bugs.webkit.org/show_bug.cgi?id=154077
<rdar://problem/24589133>
Reviewed by Joseph Pecoraro.
Instead of not generating a listing for the target when it is occupied,
generate the listing with a 'paired' flag. The old flag was redundant
because a _WKAutomationDelegate will not create a session if it doesn't
support automation or it already has an active session.
* inspector/remote/RemoteAutomationTarget.cpp:
(Inspector::RemoteAutomationTarget::setIsPaired):
(Inspector::RemoteAutomationTarget::setAutomationAllowed): Deleted.
* inspector/remote/RemoteAutomationTarget.h:
Return false for remoteControlAllowed() if the target is already paired.
This function is used by RemoteInspector to deny incoming connections.
* inspector/remote/RemoteInspector.mm:
(Inspector::RemoteInspector::listingForAutomationTarget):
* inspector/remote/RemoteInspectorConstants.h:
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (196453 => 196454)
--- trunk/Source/_javascript_Core/ChangeLog 2016-02-12 00:02:03 UTC (rev 196453)
+++ trunk/Source/_javascript_Core/ChangeLog 2016-02-12 00:02:29 UTC (rev 196454)
@@ -1,3 +1,27 @@
+2016-02-11 Brian Burg <[email protected]>
+
+ Web Inspector: RemoteInspector's listings should include whether an AutomationTarget is paired
+ https://bugs.webkit.org/show_bug.cgi?id=154077
+ <rdar://problem/24589133>
+
+ Reviewed by Joseph Pecoraro.
+
+ Instead of not generating a listing for the target when it is occupied,
+ generate the listing with a 'paired' flag. The old flag was redundant
+ because a _WKAutomationDelegate will not create a session if it doesn't
+ support automation or it already has an active session.
+
+ * inspector/remote/RemoteAutomationTarget.cpp:
+ (Inspector::RemoteAutomationTarget::setIsPaired):
+ (Inspector::RemoteAutomationTarget::setAutomationAllowed): Deleted.
+ * inspector/remote/RemoteAutomationTarget.h:
+ Return false for remoteControlAllowed() if the target is already paired.
+ This function is used by RemoteInspector to deny incoming connections.
+
+ * inspector/remote/RemoteInspector.mm:
+ (Inspector::RemoteInspector::listingForAutomationTarget):
+ * inspector/remote/RemoteInspectorConstants.h:
+
2016-02-11 Filip Pizlo <[email protected]>
DFG::ByteCodeParser needs to null check the result of presenceLike()
Modified: trunk/Source/_javascript_Core/inspector/remote/RemoteAutomationTarget.cpp (196453 => 196454)
--- trunk/Source/_javascript_Core/inspector/remote/RemoteAutomationTarget.cpp 2016-02-12 00:02:03 UTC (rev 196453)
+++ trunk/Source/_javascript_Core/inspector/remote/RemoteAutomationTarget.cpp 2016-02-12 00:02:29 UTC (rev 196454)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2015 Apple Inc. All rights reserved.
+ * Copyright (C) 2015, 2016 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -32,12 +32,12 @@
namespace Inspector {
-void RemoteAutomationTarget::setAutomationAllowed(bool allowed)
+void RemoteAutomationTarget::setIsPaired(bool paired)
{
- if (m_allowed == allowed)
+ if (m_paired == paired)
return;
- m_allowed = allowed;
+ m_paired = paired;
update();
}
Modified: trunk/Source/_javascript_Core/inspector/remote/RemoteAutomationTarget.h (196453 => 196454)
--- trunk/Source/_javascript_Core/inspector/remote/RemoteAutomationTarget.h 2016-02-12 00:02:03 UTC (rev 196453)
+++ trunk/Source/_javascript_Core/inspector/remote/RemoteAutomationTarget.h 2016-02-12 00:02:29 UTC (rev 196454)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2015 Apple Inc. All rights reserved.
+ * Copyright (C) 2015, 2016 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -39,15 +39,15 @@
public:
virtual ~RemoteAutomationTarget() { }
- bool automationAllowed() const { return m_allowed; }
- void setAutomationAllowed(bool);
+ bool isPaired() const { return m_paired; }
+ void setIsPaired(bool);
virtual String name() const = 0;
virtual RemoteControllableTarget::Type type() const override { return RemoteControllableTarget::Type::Automation; }
- virtual bool remoteControlAllowed() const override { return automationAllowed(); };
+ virtual bool remoteControlAllowed() const override { return !m_paired; };
private:
- bool m_allowed { false };
+ bool m_paired { false };
};
} // namespace Inspector
Modified: trunk/Source/_javascript_Core/inspector/remote/RemoteInspector.mm (196453 => 196454)
--- trunk/Source/_javascript_Core/inspector/remote/RemoteInspector.mm 2016-02-12 00:02:03 UTC (rev 196453)
+++ trunk/Source/_javascript_Core/inspector/remote/RemoteInspector.mm 2016-02-12 00:02:29 UTC (rev 196454)
@@ -525,13 +525,11 @@
// implemented by non-threadsafe JSC / WebCore classes such as JSGlobalObject or WebCore::Page.
ASSERT(isMainThread());
- if (!target.automationAllowed())
- return nil;
-
RetainPtr<NSMutableDictionary> listing = adoptNS([[NSMutableDictionary alloc] init]);
[listing setObject:@(target.identifier()) forKey:WIRPageIdentifierKey];
[listing setObject:target.name() forKey:WIRTitleKey];
[listing setObject:WIRTypeAutomation forKey:WIRTypeKey];
+ [listing setObject:@(target.isPaired()) forKey:WIRAutomationTargetIsPairedKey];
if (auto connection = m_connectionMap.get(target.identifier()))
[listing setObject:connection->connectionIdentifier() forKey:WIRConnectionIdentifierKey];
Modified: trunk/Source/_javascript_Core/inspector/remote/RemoteInspectorConstants.h (196453 => 196454)
--- trunk/Source/_javascript_Core/inspector/remote/RemoteInspectorConstants.h 2016-02-12 00:02:03 UTC (rev 196453)
+++ trunk/Source/_javascript_Core/inspector/remote/RemoteInspectorConstants.h 2016-02-12 00:02:29 UTC (rev 196454)
@@ -82,6 +82,8 @@
#define WIRAutomaticInspectionRejectMessage @"WIRAutomaticInspectionRejectMessage"
#define WIRAutomaticInspectionCandidateMessage @"WIRAutomaticInspectionCandidateMessage"
+#define WIRAutomationTargetIsPairedKey @"WIRAutomationTargetIsPairedKey"
+
// These definitions are shared with a Simulator webinspectord and
// OS X process communicating with it.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes