Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 6e26b0d897468c5e8def294c7607a3fd31470580
https://github.com/WebKit/WebKit/commit/6e26b0d897468c5e8def294c7607a3fd31470580
Author: Bartosz Moczulski <[email protected]>
Date: 2024-11-12 (Tue, 12 Nov 2024)
Changed paths:
M Source/WebInspectorUI/UserInterface/Base/Utilities.js
Log Message:
-----------
Web Inspector: Be nice to Chromium and access Float16Array as window property
to avoid ReferenceError
https://bugs.webkit.org/show_bug.cgi?id=282924
Reviewed by Devin Rousso.
Since implementation of Float16Array in https://commits.webkit.org/281870@main
isTypedArray() in Utilities.js assumes that Float16Array exists and constructor
can be compared with it. This assumptions holds in WebKit but fails in Chromium
leading to multiple strange errors, e.g.: DOM nodes not showing up on Elements
tab without page reload, then CSS not showing up at all.
The following error can be observed in JS console:
Main.js:33247 ReferenceError: Float16Array is not defined
at Function.value (Main.js:775:259)
at isArrayLike (Main.js:776:57)
at Function.value (Main.js:777:5)
at Function.value (Main.js:678:22)
at DOMStorageManager._domStorageForIdentifier (Main.js:30568:62)
at addDOMStorage (Main.js:30575:121)
at DOMStorageManager._addDOMStorageIfNeeded (Main.js:30576:279)
at DOMStorageManager._securityOriginDidChange (Main.js:30587:7)
at dispatch (Main.js:293:24)
at Frame.dispatchEventToListeners (Main.js:295:100)
To avoid the error bare Float16Array is refactored to `window.Float16Array`
which returns `undefined` if the function doesn't exist and then nicely compares
`false`, just as expected.
While Chromium need not be supported officially, HTTP WebInspector used to work
flawlessly in Chromium since introduction in 2.38 and it seems to make sense to
retain at least best-effort support for people not fortunate enough to have a
native WebKit-based browser available on their OS.
* Source/WebInspectorUI/UserInterface/Base/Utilities.js:
Canonical link: https://commits.webkit.org/286475@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes