WebKit Bugzilla
Attachment 361248 Details for
Bug 194319
: Web Inspector: "Worker not found" uncaught protocol errors
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
[PATCH] Proposed Fix
workers-1.patch (text/plain), 3.39 KB, created by
Joseph Pecoraro
on 2019-02-05 16:47:04 PST
(
hide
)
Description:
[PATCH] Proposed Fix
Filename:
MIME Type:
Creator:
Joseph Pecoraro
Created:
2019-02-05 16:47:04 PST
Size:
3.39 KB
patch
obsolete
>diff --git a/Source/WebInspectorUI/ChangeLog b/Source/WebInspectorUI/ChangeLog >index 08a49fed285..473364eaa28 100644 >--- a/Source/WebInspectorUI/ChangeLog >+++ b/Source/WebInspectorUI/ChangeLog >@@ -1,3 +1,25 @@ >+2019-02-05 Joseph Pecoraro <pecoraro@apple.com> >+ >+ Web Inspector: "Worker not found" uncaught protocol errors >+ https://bugs.webkit.org/show_bug.cgi?id=194319 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * UserInterface/Base/Main.js: >+ (WI.terminatePageTarget): >+ Remove Worker targets associated with the Page on navigation. >+ Eventually we will have to associate Workers with their parent >+ frame, but for now this is the only a page transition can kill >+ all worker targets. >+ >+ * UserInterface/Controllers/WorkerManager.js: >+ (WI.WorkerManager.prototype.workerCreated): >+ * UserInterface/Protocol/Connection.js: >+ (InspectorBackend.WorkerConnection.sendMessageToBackend): >+ Allow any WorkerAgent domain message to fail silently. This can >+ happen if a Worker is created and destroyed before the frontend >+ hears about it and sends messages to the backend for that Worker. >+ > 2019-02-01 Joseph Pecoraro <pecoraro@apple.com> > > Web Inspector: Make WI.ColumnChart a WI.View subclass >diff --git a/Source/WebInspectorUI/UserInterface/Base/Main.js b/Source/WebInspectorUI/UserInterface/Base/Main.js >index 8656948e313..28136c06dfd 100644 >--- a/Source/WebInspectorUI/UserInterface/Base/Main.js >+++ b/Source/WebInspectorUI/UserInterface/Base/Main.js >@@ -228,6 +228,11 @@ WI.terminatePageTarget = function(target) > console.assert(WI.pageTarget === target); > console.assert(WI.sharedApp.debuggableType === WI.DebuggableType.Web); > >+ // Remove any Worker targets associated with this page. >+ let workerTargets = WI.targets.filter((x) => x.type === WI.Target.Type.Worker); >+ for (let workerTarget of workerTargets) >+ WI.workerManager.workerTerminated(workerTarget.identifier); >+ > WI.pageTarget = null; > > WI.redirectGlobalAgentsToConnection(WI.backendConnection); >diff --git a/Source/WebInspectorUI/UserInterface/Controllers/WorkerManager.js b/Source/WebInspectorUI/UserInterface/Controllers/WorkerManager.js >index 3713a7947a0..26ab8c5aeab 100644 >--- a/Source/WebInspectorUI/UserInterface/Controllers/WorkerManager.js >+++ b/Source/WebInspectorUI/UserInterface/Controllers/WorkerManager.js >@@ -55,7 +55,7 @@ WI.WorkerManager = class WorkerManager extends WI.Object > this._connections.set(workerId, connection); > > // Unpause the worker now that we have sent all initialization messages. >- WorkerAgent.initialized(workerId); >+ WorkerAgent.initialized(workerId).catch(function(){}); > } > > workerTerminated(workerId) >diff --git a/Source/WebInspectorUI/UserInterface/Protocol/Connection.js b/Source/WebInspectorUI/UserInterface/Protocol/Connection.js >index d137f884ed0..b273787f3b3 100644 >--- a/Source/WebInspectorUI/UserInterface/Protocol/Connection.js >+++ b/Source/WebInspectorUI/UserInterface/Protocol/Connection.js >@@ -308,7 +308,8 @@ InspectorBackend.WorkerConnection = class InspectorBackendWorkerConnection exten > > sendMessageToBackend(message) > { >- WorkerAgent.sendMessageToWorker(this._workerId, message); >+ // Ignore errors if a worker went away quickly. >+ WorkerAgent.sendMessageToWorker(this._workerId, message).catch(function(){}); > } > }; >
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
Flags:
mattbaker
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 194319
: 361248 |
361308