Changeset 24884 in webkit for trunk/JavaScriptCore/API/JSBase.cpp


Ignore:
Timestamp:
Aug 6, 2007, 12:00:46 PM (18 years ago)
Author:
darin
Message:

Reviewed by Anders.

  • fix <rdar://problem/5387589> 9A514: Quartz Composer crash on launch in KJS::jsString
  • API/JSBase.cpp: (JSEvaluateScript): Turn NULL for sourceURL into UString::null(), just as JSObjectMakeFunction already does. (JSCheckScriptSyntax): Ditto.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/API/JSBase.cpp

    r24874 r24884  
    4343    JSObject* jsThisObject = toJS(thisObject);
    4444    UString::Rep* scriptRep = toJS(script);
    45     UString::Rep* sourceURLRep = toJS(sourceURL);
     45    UString::Rep* sourceURLRep = sourceURL ? toJS(sourceURL) : &UString::Rep::null;
    4646    // Interpreter::evaluate sets "this" to the global object if it is NULL
    4747    Completion completion = exec->dynamicInterpreter()->evaluate(UString(sourceURLRep), startingLineNumber, UString(scriptRep), jsThisObject);
     
    6666    ExecState* exec = toJS(ctx);
    6767    UString::Rep* scriptRep = toJS(script);
    68     UString::Rep* sourceURLRep = toJS(sourceURL);
     68    UString::Rep* sourceURLRep = sourceURL ? toJS(sourceURL) : &UString::Rep::null;
    6969    Completion completion = exec->dynamicInterpreter()->checkSyntax(UString(sourceURLRep), startingLineNumber, UString(scriptRep));
    7070    if (completion.complType() == Throw) {
Note: See TracChangeset for help on using the changeset viewer.