WebKit Bugzilla
Attachment 362208 Details for
Bug 194740
: Web Inspector: Logging a native function to the console, such as `alert`, produces unhandled rejection
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
[PATCH] Proposed Fix
no-source-found-1.patch (text/plain), 2.86 KB, created by
Joseph Pecoraro
on 2019-02-15 21:57:52 PST
(
hide
)
Description:
[PATCH] Proposed Fix
Filename:
MIME Type:
Creator:
Joseph Pecoraro
Created:
2019-02-15 21:57:52 PST
Size:
2.86 KB
patch
obsolete
>diff --git a/Source/WebInspectorUI/ChangeLog b/Source/WebInspectorUI/ChangeLog >index acb712575a1..c46786dc14c 100644 >--- a/Source/WebInspectorUI/ChangeLog >+++ b/Source/WebInspectorUI/ChangeLog >@@ -1,3 +1,19 @@ >+2019-02-15 Joseph Pecoraro <pecoraro@apple.com> >+ >+ Web Inspector: Logging a native function to the console, such as `alert`, produces unhandled rejection >+ https://bugs.webkit.org/show_bug.cgi?id=194740 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * UserInterface/Protocol/RemoteObject.js: >+ (WI.RemoteObject.prototype.findFunctionSourceCodeLocation): >+ In case of a protocol error (common when attempting to get a location >+ for a native function) produce the NoSourceFound result. >+ >+ * UserInterface/Views/ConsoleMessageView.js: >+ (WI.ConsoleMessageView.prototype._appendLocationLink): >+ Simplify with an arrow function. >+ > 2019-02-15 Joseph Pecoraro <pecoraro@apple.com> > > Web Inspector: Some timelines views work, show Legacy CPU timeline >diff --git a/Source/WebInspectorUI/UserInterface/Protocol/RemoteObject.js b/Source/WebInspectorUI/UserInterface/Protocol/RemoteObject.js >index 160cc7eb236..bf2317c570d 100644 >--- a/Source/WebInspectorUI/UserInterface/Protocol/RemoteObject.js >+++ b/Source/WebInspectorUI/UserInterface/Protocol/RemoteObject.js >@@ -610,7 +610,7 @@ WI.RemoteObject = class RemoteObject > > this._target.DebuggerAgent.getFunctionDetails(this._objectId, (error, response) => { > if (error) { >- result.reject(error); >+ result.resolve(WI.RemoteObject.SourceCodeLocationPromise.NoSourceFound); > return; > } > >diff --git a/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.js b/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.js >index de6ec24e991..4cf58fd3ffd 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.js >+++ b/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.js >@@ -354,7 +354,7 @@ WI.ConsoleMessageView = class ConsoleMessageView extends WI.Object > if (this._message.parameters && this._message.parameters.length === 1) { > var parameter = this._createRemoteObjectIfNeeded(this._message.parameters[0]); > >- parameter.findFunctionSourceCodeLocation().then(function(result) { >+ parameter.findFunctionSourceCodeLocation().then((result) => { > if (result === WI.RemoteObject.SourceCodeLocationPromise.NoSourceFound || result === WI.RemoteObject.SourceCodeLocationPromise.MissingObjectId) > return; > >@@ -365,7 +365,7 @@ WI.ConsoleMessageView = class ConsoleMessageView extends WI.Object > this._element.insertBefore(link, this._element.firstChild); > else > this._element.appendChild(link); >- }.bind(this)); >+ }); > } > } >
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 194740
: 362208