Skip to content

Commit

Permalink
[JSC] Mask should exclude blob URLs too
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=270947
rdar://124564230

Reviewed by Timothy Hatcher.

We observed performance issues that masking includes blob URLs.
http / https are excluded in 252253@main to avoid performance issues
for Error.stack. We should exclude blob too.

* Source/JavaScriptCore/runtime/StackFrame.cpp:
(JSC::processSourceURL):

Canonical link: https://commits.webkit.org/276071@main
  • Loading branch information
Constellation committed Mar 14, 2024
1 parent 2f03251 commit dd7d672
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/JavaScriptCore/runtime/StackFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ SourceID StackFrame::sourceID() const

static String processSourceURL(VM& vm, const JSC::StackFrame& frame, const String& sourceURL)
{
if (vm.clientData && !sourceURL.startsWithIgnoringASCIICase("http"_s)) {
if (vm.clientData && (!protocolIsInHTTPFamily(sourceURL) && !protocolIs(sourceURL, "blob"_s))) {
String overrideURL = vm.clientData->overrideSourceURL(frame, sourceURL);
if (!overrideURL.isNull())
return overrideURL;
Expand Down

0 comments on commit dd7d672

Please sign in to comment.