⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 259636 in webkit


Ignore:
Timestamp:
Apr 7, 2020, 8:48:08 AM (6 years ago)
Author:
ysuzuki@apple.com
Message:

[JSC] $.evalScript should check exception when accessing "global"
https://bugs.webkit.org/show_bug.cgi?id=210114
<rdar://problem/61388482>

Reviewed by Keith Miller.

JSTests:

  • stress/eval-script-global-access-exception-check.js: Added.

(shouldThrow):

Source/JavaScriptCore:

$.evalScript should check exception after "global" property access since it can throw an error if it is an accessor.

  • jsc.cpp:

(functionDollarEvalScript):

Location:
trunk
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/JSTests/ChangeLog

    r259587 r259636  
     12020-04-07  Yusuke Suzuki  <ysuzuki@apple.com>
     2
     3        [JSC] $.evalScript should check exception when accessing "global"
     4        https://bugs.webkit.org/show_bug.cgi?id=210114
     5        <rdar://problem/61388482>
     6
     7        Reviewed by Keith Miller.
     8
     9        * stress/eval-script-global-access-exception-check.js: Added.
     10        (shouldThrow):
     11
    1122020-04-06  Rick Waldron  <waldron.rick@gmail.com> and Alexey Shvayka  <shvaikalesh@gmail.com>
    213
  • trunk/Source/JavaScriptCore/ChangeLog

    r259618 r259636  
     12020-04-07  Yusuke Suzuki  <ysuzuki@apple.com>
     2
     3        [JSC] $.evalScript should check exception when accessing "global"
     4        https://bugs.webkit.org/show_bug.cgi?id=210114
     5        <rdar://problem/61388482>
     6
     7        Reviewed by Keith Miller.
     8
     9        $.evalScript should check exception after "global" property access since it can throw an error if it is an accessor.
     10
     11        * jsc.cpp:
     12        (functionDollarEvalScript):
     13
    1142020-04-06  Devin Rousso  <drousso@apple.com>
    215
  • trunk/Source/JavaScriptCore/jsc.cpp

    r259614 r259636  
    18601860    RETURN_IF_EXCEPTION(scope, encodedJSValue());
    18611861   
    1862     GlobalObject* realm = jsDynamicCast<GlobalObject*>(vm,
    1863         callFrame->thisValue().get(globalObject, Identifier::fromString(vm, "global")));
     1862    JSValue global = callFrame->thisValue().get(globalObject, Identifier::fromString(vm, "global"));
     1863    RETURN_IF_EXCEPTION(scope, encodedJSValue());
     1864    GlobalObject* realm = jsDynamicCast<GlobalObject*>(vm, global);
    18641865    RETURN_IF_EXCEPTION(scope, encodedJSValue());
    18651866    if (!realm)
Note: See TracChangeset for help on using the changeset viewer.