WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
224215
Array's toString() is incorrect if join() is non-callable
https://bugs.webkit.org/show_bug.cgi?id=224215
Summary
Array's toString() is incorrect if join() is non-callable
Alexey Shvayka
Reported
2021-04-05 16:38:36 PDT
Array's toString() is incorrect if join() is non-callable
Attachments
Patch
(10.69 KB, patch)
2021-04-05 17:13 PDT
,
Alexey Shvayka
ysuzuki
: review+
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Alexey Shvayka
Comment 1
2021-04-05 17:13:06 PDT
Created
attachment 425225
[details]
Patch
Yusuke Suzuki
Comment 2
2021-04-05 17:36:51 PDT
Comment on
attachment 425225
[details]
Patch r=me
Alexey Shvayka
Comment 3
2021-04-06 13:20:47 PDT
Committed
r275544
(
236200@main
): <
https://commits.webkit.org/236200@main
>
Radar WebKit Bug Importer
Comment 4
2021-04-06 13:21:42 PDT
<
rdar://problem/76281426
>
Darin Adler
Comment 5
2021-04-06 14:41:23 PDT
Comment on
attachment 425225
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=425225&action=review
> Source/JavaScriptCore/runtime/ObjectPrototype.cpp:322 > + if (thisValue.isUndefined()) > + return vm.smallStrings.undefinedObjectString(); > + if (thisValue.isNull()) > + return vm.smallStrings.nullObjectString();
Isn’t it an error to return after invoking DECLARE_THROW_SCOPE without using RELEASE_AND_RETURN? Must admit I am confused about the ThrowScope idioms.
Mark Lam
Comment 6
2021-04-06 15:03:41 PDT
Comment on
attachment 425225
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=425225&action=review
>> Source/JavaScriptCore/runtime/ObjectPrototype.cpp:322 >> + return vm.smallStrings.nullObjectString(); > > Isn’t it an error to return after invoking DECLARE_THROW_SCOPE without using RELEASE_AND_RETURN? Must admit I am confused about the ThrowScope idioms.
It's not if the statement you evaluate here cannot throw. The "release" in RELEASE_AND_RETURN means that this ThrowScope is releasing the responsibility to check for any exceptions from this point on till the return, and letting the caller handle it. This makes sense if the last statement we evaluate can throw. If you don't release the responsibility, and you don't check for an exception, but the statement can throw, then that's an unhandled exception because you still have the responsibility and you didn't do the check when one is needed. But if the statement cannot throw, then all is well because no check is needed after all before we return though we still have the responsibility.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug