-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes #9263 #9266
Fixes #9263 #9266
Conversation
@@ -101,6 +101,7 @@ void URLSearchParams::sort() | |||
return WTF::codePointCompareLessThan(a.key, b.key); | |||
}); | |||
updateURL(); | |||
needsSorting = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why does needsSorting
exist? it doesn't seem to be used
❌ @Jarred-Sumner 1 files with test failures on bun-darwin-aarch64: |
❌ @Jarred-Sumner 1 files with test failures on bun-darwin-x64: |
❌🪟 @Jarred-Sumner, there are 14 test regressions on Windows x86_64
|
return; | ||
m_pairs.removeAllMatching([&](const auto& pair) { | ||
return pair.key == name && (value.isNull() || pair.value == value); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Relavent WebKit change: WebKit/WebKit@93a5678
RELEASE_AND_RETURN(throwScope, JSValue::encode(toJS<IDLUndefined>(*lexicalGlobalObject, throwScope, [&]() -> decltype(auto) { return impl.remove(WTFMove(name)); }))); | ||
|
||
String value; | ||
EnsureStillAliveScope argument1 = callFrame->argument(1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -278,7 +279,15 @@ static inline JSC::EncodedJSValue jsURLSearchParamsPrototypeFunction_deleteBody( | |||
EnsureStillAliveScope argument0 = callFrame->uncheckedArgument(0); | |||
auto name = convert<IDLUSVString>(*lexicalGlobalObject, argument0.value()); | |||
RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); | |||
RELEASE_AND_RETURN(throwScope, JSValue::encode(toJS<IDLUndefined>(*lexicalGlobalObject, throwScope, [&]() -> decltype(auto) { return impl.remove(WTFMove(name)); }))); | |||
|
|||
String value; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should do an argsCount() check here before argument(1)
since the arg count may be 1 and not 2.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
argument() does the check internally
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah that's right, I was looking at the wrong implementation. I thought I remembered something about uncheckedArgument
: https://github.com/WebKit/WebKit/blob/de89f2977a314e5ddbe49384e35b953061d17f29/Source/JavaScriptCore/interpreter/CallFrame.h#L275-L285
What does this PR do?
Fixes #9263
some code copied from webkit
How did you verify your code works?
A couple tests