Changeset 233998 in webkit


Ignore:
Timestamp:
Jul 19, 2018 12:28:08 PM (6 years ago)
Author:
mark.lam@apple.com
Message:

Temporarily mitigate a bug where a source provider is null when it shouldn't be.
https://bugs.webkit.org/show_bug.cgi?id=187812
<rdar://problem/41192691>

Reviewed by Michael Saboff.

Adding a null check to temporarily mitigate https://bugs.webkit.org/show_bug.cgi?id=187811.

  • runtime/Error.cpp:

(JSC::addErrorInfo):

Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r233990 r233998  
     12018-07-19  Mark Lam  <mark.lam@apple.com>
     2
     3        Temporarily mitigate a bug where a source provider is null when it shouldn't be.
     4        https://bugs.webkit.org/show_bug.cgi?id=187812
     5        <rdar://problem/41192691>
     6
     7        Reviewed by Michael Saboff.
     8
     9        Adding a null check to temporarily mitigate https://bugs.webkit.org/show_bug.cgi?id=187811.
     10
     11        * runtime/Error.cpp:
     12        (JSC::addErrorInfo):
     13
    1142018-07-19  Keith Rollin  <krollin@apple.com>
    215
  • trunk/Source/JavaScriptCore/runtime/Error.cpp

    r233122 r233998  
    240240{
    241241    VM& vm = callFrame->vm();
    242     const String& sourceURL = source.provider()->url();
    243242   
    244243    // The putDirect() calls below should really be put() so that they trigger materialization of
     
    257256    if (line != -1)
    258257        error->putDirect(vm, vm.propertyNames->line, jsNumber(line));
    259     if (!sourceURL.isNull())
    260         error->putDirect(vm, vm.propertyNames->sourceURL, jsString(&vm, sourceURL));
     258
     259    SourceProvider* provider = source.provider();
     260    // FIXME: Remove this ASSERT and null check when https://webkit.org/b/187811 is fixed.
     261    ASSERT(provider);
     262    if (LIKELY(provider)) {
     263        const String& sourceURL = provider->url();
     264        if (!sourceURL.isNull())
     265            error->putDirect(vm, vm.propertyNames->sourceURL, jsString(&vm, sourceURL));
     266    }
    261267    return error;
    262268}
Note: See TracChangeset for help on using the changeset viewer.