Changeset 217498 in webkit


Ignore:
Timestamp:
May 26, 2017, 11:45:43 AM (8 years ago)
Author:
mark.lam@apple.com
Message:

REGRESSION(216914): testCFStrings encounters an invalid ExecState callee pointer.
https://bugs.webkit.org/show_bug.cgi?id=172651

Reviewed by Saam Barati.

This is because the assertion utility functions used in testCFStrings() expects
to get the JSGlobalContextRef from the global context variable. However,
testCFStrings() creates its own JSGlobalContextRef but does not set the global
context variable to it.

The fix is to make testCFStrings() initialize the global context variable properly.

  • API/tests/testapi.c:

(testCFStrings):

Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/API/tests/testapi.c

    r216914 r217498  
    12401240static void testCFStrings(void)
    12411241{
    1242     JSGlobalContextRef context = JSGlobalContextCreate(0);
     1242    /* The assertion utility functions we use below expects to get the JSGlobalContextRef
     1243       from the global context variable. */
     1244    JSGlobalContextRef oldContext = context;
     1245    context = JSGlobalContextCreate(0);
    12431246
    12441247    UniChar singleUniChar = 65; // Capital A
     
    13331336
    13341337    JSGlobalContextRelease(context);
     1338    context = oldContext;
    13351339}
    13361340#endif
  • trunk/Source/JavaScriptCore/ChangeLog

    r217495 r217498  
     12017-05-26  Mark Lam  <mark.lam@apple.com>
     2
     3        REGRESSION(216914): testCFStrings encounters an invalid ExecState callee pointer.
     4        https://bugs.webkit.org/show_bug.cgi?id=172651
     5
     6        Reviewed by Saam Barati.
     7
     8        This is because the assertion utility functions used in testCFStrings() expects
     9        to get the JSGlobalContextRef from the global context variable.  However,
     10        testCFStrings() creates its own JSGlobalContextRef but does not set the global
     11        context variable to it.
     12
     13        The fix is to make testCFStrings() initialize the global context variable properly.
     14
     15        * API/tests/testapi.c:
     16        (testCFStrings):
     17
    1182017-05-26  Yusuke Suzuki  <utatane.tea@gmail.com>
    219
Note: See TracChangeset for help on using the changeset viewer.