Skip to content

Commit c7ade1a

Browse files
authored
browser(webkit): revert unused Target.oldTargetId (#1096)
1 parent 30a4d0e commit c7ade1a

File tree

2 files changed

+14
-50
lines changed

2 files changed

+14
-50
lines changed

browser_patches/webkit/BUILD_NUMBER

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1155
1+
1156

browser_patches/webkit/patches/bootstrap.diff

+13-49
Original file line numberDiff line numberDiff line change
@@ -259,18 +259,10 @@ index 0cc2127c9c12c2d82dea9550bad73f4ffb99ba24..490238b408da6b6ce7fbcccf13884997
259259
}
260260

261261
diff --git a/Source/JavaScriptCore/inspector/InspectorTarget.h b/Source/JavaScriptCore/inspector/InspectorTarget.h
262-
index 4b95964db4d902b4b7f4b0b4c40afea51654ff2f..db2fde501b30c8e4fafcac3b2b403713c768c34f 100644
262+
index 4b95964db4d902b4b7f4b0b4c40afea51654ff2f..f08e769a7b5435d215cd69ca8cc61ea0e741e417 100644
263263
--- a/Source/JavaScriptCore/inspector/InspectorTarget.h
264264
+++ b/Source/JavaScriptCore/inspector/InspectorTarget.h
265-
@@ -47,6 +47,7 @@ public:
266-
virtual InspectorTargetType type() const = 0;
267-
268-
virtual bool isProvisional() const { return false; }
269-
+ virtual String oldTargetID() const { return String(); }
270-
bool isPaused() const { return m_isPaused; }
271-
void pause();
272-
void resume();
273-
@@ -56,6 +57,8 @@ public:
265+
@@ -56,6 +56,8 @@ public:
274266
virtual void connect(FrontendChannel::ConnectionType) = 0;
275267
virtual void disconnect() = 0;
276268
virtual void sendMessageToTargetBackend(const String&) = 0;
@@ -280,7 +272,7 @@ index 4b95964db4d902b4b7f4b0b4c40afea51654ff2f..db2fde501b30c8e4fafcac3b2b403713
280272
private:
281273
WTF::Function<void()> m_resumeCallback;
282274
diff --git a/Source/JavaScriptCore/inspector/agents/InspectorTargetAgent.cpp b/Source/JavaScriptCore/inspector/agents/InspectorTargetAgent.cpp
283-
index 8fcb5a1e55750d325a84824d86c49cfe6fb04268..b56ffaa68a34aa3e7119962cd8404cafb9b420ec 100644
275+
index 8fcb5a1e55750d325a84824d86c49cfe6fb04268..ed2525df326bfe649793701a112eefa30952e375 100644
284276
--- a/Source/JavaScriptCore/inspector/agents/InspectorTargetAgent.cpp
285277
+++ b/Source/JavaScriptCore/inspector/agents/InspectorTargetAgent.cpp
286278
@@ -87,6 +87,28 @@ void InspectorTargetAgent::sendMessageToTarget(ErrorString& errorString, const S
@@ -312,19 +304,7 @@ index 8fcb5a1e55750d325a84824d86c49cfe6fb04268..b56ffaa68a34aa3e7119962cd8404caf
312304
void InspectorTargetAgent::sendMessageFromTargetToFrontend(const String& targetId, const String& message)
313305
{
314306
ASSERT_WITH_MESSAGE(m_targets.get(targetId), "Sending a message from an untracked target to the frontend.");
315-
@@ -115,8 +137,10 @@ static Ref<Protocol::Target::TargetInfo> buildTargetInfoObject(const InspectorTa
316-
.setTargetId(target.identifier())
317-
.setType(targetTypeToProtocolType(target.type()))
318-
.release();
319-
- if (target.isProvisional())
320-
+ if (target.isProvisional()) {
321-
result->setIsProvisional(true);
322-
+ result->setOldTargetId(target.oldTargetID());
323-
+ }
324-
if (target.isPaused())
325-
result->setIsPaused(true);
326-
return result;
327-
@@ -144,7 +168,17 @@ void InspectorTargetAgent::targetDestroyed(InspectorTarget& target)
307+
@@ -144,7 +166,17 @@ void InspectorTargetAgent::targetDestroyed(InspectorTarget& target)
328308
if (!m_isConnected)
329309
return;
330310

@@ -343,7 +323,7 @@ index 8fcb5a1e55750d325a84824d86c49cfe6fb04268..b56ffaa68a34aa3e7119962cd8404caf
343323
}
344324

345325
void InspectorTargetAgent::didCommitProvisionalTarget(const String& oldTargetID, const String& committedTargetID)
346-
@@ -159,6 +193,18 @@ void InspectorTargetAgent::didCommitProvisionalTarget(const String& oldTargetID,
326+
@@ -159,6 +191,18 @@ void InspectorTargetAgent::didCommitProvisionalTarget(const String& oldTargetID,
347327
m_frontendDispatcher->didCommitProvisionalTarget(oldTargetID, committedTargetID);
348328
}
349329

@@ -1245,20 +1225,19 @@ index a8fc5332ac92424b00a3dec62152fd3c5f28544e..2fba82d5f991bcfc1315628728771ff1
12451225
]
12461226
}
12471227
diff --git a/Source/JavaScriptCore/inspector/protocol/Target.json b/Source/JavaScriptCore/inspector/protocol/Target.json
1248-
index 52920cded24a9c6b0ef6fb4e518664955db4f9fa..11d40820629d3104408e14a3f92d9f0265b78ce1 100644
1228+
index 52920cded24a9c6b0ef6fb4e518664955db4f9fa..bbbabc4e7259088b9404e8cc07eecd6f45077da0 100644
12491229
--- a/Source/JavaScriptCore/inspector/protocol/Target.json
12501230
+++ b/Source/JavaScriptCore/inspector/protocol/Target.json
1251-
@@ -10,7 +10,8 @@
1231+
@@ -10,7 +10,7 @@
12521232
"properties": [
12531233
{ "name": "targetId", "type": "string", "description": "Unique identifier for the target." },
12541234
{ "name": "type", "type": "string", "enum": ["page", "service-worker", "worker"] },
12551235
- { "name": "isProvisional", "type": "boolean", "optional": true, "description": "Whether this is a provisional page target." },
12561236
+ { "name": "isProvisional", "type": "boolean", "optional": true, "description": "True value indicates that this is a provisional page target i.e. Such target may be created when current page starts cross-origin navigation. Eventually each provisional target is either committed and swaps with the current target or gets destroyed, e.g. in case of load request failure." },
1257-
+ { "name": "oldTargetId", "type": "string", "optional": true, "description": "Unique identifier of the target which is going to be replaced if this target is committed. Only set for provisional targets." },
12581237
{ "name": "isPaused", "type": "boolean", "optional": true, "description": "Whether the target is paused on start and has to be explicitely resumed by inspector." }
12591238
]
12601239
}
1261-
@@ -37,6 +38,21 @@
1240+
@@ -37,6 +37,21 @@
12621241
{ "name": "targetId", "type": "string" },
12631242
{ "name": "message", "type": "string", "description": "JSON Inspector Protocol message (command) to be dispatched on the backend." }
12641243
]
@@ -1280,7 +1259,7 @@ index 52920cded24a9c6b0ef6fb4e518664955db4f9fa..11d40820629d3104408e14a3f92d9f02
12801259
}
12811260
],
12821261
"events": [
1283-
@@ -49,7 +65,8 @@
1262+
@@ -49,7 +64,8 @@
12841263
{
12851264
"name": "targetDestroyed",
12861265
"parameters": [
@@ -7084,7 +7063,7 @@ index 4896c404bc8b25d69360de7d1c509383282b2317..14bdebf732e929ea367c961f9d0bec85
70847063
// The timeout we use when waiting for a DidUpdateGeometry message.
70857064
static constexpr Seconds didUpdateBackingStoreStateTimeout() { return Seconds::fromMilliseconds(500); }
70867065
diff --git a/Source/WebKit/UIProcess/Inspector/InspectorTargetProxy.cpp b/Source/WebKit/UIProcess/Inspector/InspectorTargetProxy.cpp
7087-
index 6928ca2fbfb6939062e3cd14bb7ba6f2fdc87f5f..8259a01bb98789c07f88cafd4f3af553e65d0cf9 100644
7066+
index 6928ca2fbfb6939062e3cd14bb7ba6f2fdc87f5f..c002691e47a67b6eb89458b7a532087436505365 100644
70887067
--- a/Source/WebKit/UIProcess/Inspector/InspectorTargetProxy.cpp
70897068
+++ b/Source/WebKit/UIProcess/Inspector/InspectorTargetProxy.cpp
70907069
@@ -27,11 +27,10 @@
@@ -7134,7 +7113,7 @@ index 6928ca2fbfb6939062e3cd14bb7ba6f2fdc87f5f..8259a01bb98789c07f88cafd4f3af553
71347113
if (m_provisionalPage) {
71357114
m_provisionalPage->send(Messages::WebPage::SendMessageToTargetBackend(identifier(), message));
71367115
return;
7137-
@@ -97,9 +98,35 @@ void InspectorTargetProxy::didCommitProvisionalTarget()
7116+
@@ -97,6 +98,25 @@ void InspectorTargetProxy::didCommitProvisionalTarget()
71387117
m_provisionalPage = nullptr;
71397118
}
71407119

@@ -7160,18 +7139,8 @@ index 6928ca2fbfb6939062e3cd14bb7ba6f2fdc87f5f..8259a01bb98789c07f88cafd4f3af553
71607139
bool InspectorTargetProxy::isProvisional() const
71617140
{
71627141
return !!m_provisionalPage;
7163-
}
7164-
7165-
+String InspectorTargetProxy::oldTargetID() const
7166-
+{
7167-
+ if (!m_provisionalPage)
7168-
+ return String();
7169-
+ return WebPageInspectorTarget::toTargetID(m_page.webPageID());
7170-
+}
7171-
+
7172-
} // namespace WebKit
71737142
diff --git a/Source/WebKit/UIProcess/Inspector/InspectorTargetProxy.h b/Source/WebKit/UIProcess/Inspector/InspectorTargetProxy.h
7174-
index a2239cec8e18850f35f7f88a9c4ebadc62bf4023..f53bd7717be546157dfeb92b835a1df5513a716a 100644
7143+
index a2239cec8e18850f35f7f88a9c4ebadc62bf4023..0f424fbba140712b67de7b388d9ce074c0fe1444 100644
71757144
--- a/Source/WebKit/UIProcess/Inspector/InspectorTargetProxy.h
71767145
+++ b/Source/WebKit/UIProcess/Inspector/InspectorTargetProxy.h
71777146
@@ -37,13 +37,13 @@ class WebPageProxy;
@@ -7191,12 +7160,7 @@ index a2239cec8e18850f35f7f88a9c4ebadc62bf4023..f53bd7717be546157dfeb92b835a1df5
71917160
~InspectorTargetProxy() = default;
71927161

71937162
Inspector::InspectorTargetType type() const final { return m_type; }
7194-
@@ -51,16 +51,21 @@ public:
7195-
7196-
void didCommitProvisionalTarget();
7197-
bool isProvisional() const override;
7198-
+ String oldTargetID() const override;
7199-
7163+
@@ -55,12 +55,16 @@ public:
72007164
void connect(Inspector::FrontendChannel::ConnectionType) override;
72017165
void disconnect() override;
72027166
void sendMessageToTargetBackend(const String&) override;

0 commit comments

Comments
 (0)