Changeset 45603 in webkit


Ignore:
Timestamp:
Jul 7, 2009 1:02:10 PM (15 years ago)
Author:
Nate Chapin
Message:

2009-07-07 Nate Chapin <Nate Chapin>

Reviewed by David Levin.

Relanding r45559, which was rolled back at r45574.

https://bugs.webkit.org/show_bug.cgi?id=26857

Location:
trunk/WebCore
Files:
17 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r45602 r45603  
     12009-07-07  Nate Chapin  <japhet@chromium.org>
     2
     3        Reviewed by David Levin.
     4
     5        Relanding r45559, which was rolled back at r45574.
     6
     7        https://bugs.webkit.org/show_bug.cgi?id=26857
     8
     9        * bindings/scripts/CodeGeneratorV8.pm: Updated a function name in auto-generated bindings.
     10        * bindings/v8/V8Binding.cpp: Moved from src.chromium.org.
     11        * bindings/v8/V8Binding.h: Contents moved from src.chromium.org.
     12        * bindings/v8/V8LazyEventListener.cpp:
     13        (WebCore::V8LazyEventListener::getListenerFunction):
     14        * bindings/v8/V8Proxy.cpp:
     15        (WebCore::handleConsoleMessage):
     16        (WebCore::V8Proxy::compileScript):
     17        (WebCore::V8Proxy::sourceName):
     18        * bindings/v8/WorkerContextExecutionProxy.cpp:
     19        (WebCore::handleConsoleMessage):
     20        * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp:
     21        (WebCore::NAMED_PROPERTY_SETTER):
     22        * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp:
     23        (WebCore::CALLBACK_FUNC_DECL):
     24        * bindings/v8/custom/V8CustomXPathNSResolver.cpp:
     25        (WebCore::V8CustomXPathNSResolver::lookupNamespaceURI):
     26        * bindings/v8/custom/V8DOMWindowCustom.cpp:
     27        (WebCore::CALLBACK_FUNC_DECL):
     28        * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
     29        (WebCore::CALLBACK_FUNC_DECL):
     30        * bindings/v8/custom/V8HTMLIFrameElementCustom.cpp:
     31        (WebCore::ACCESSOR_SETTER):
     32        * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
     33        (WebCore::CALLBACK_FUNC_DECL):
     34        * bindings/v8/custom/V8HTMLSelectElementCustom.cpp:
     35        (WebCore::removeElement):
     36        * bindings/v8/custom/V8SQLTransactionCustom.cpp:
     37        (WebCore::CALLBACK_FUNC_DECL):
     38        * bindings/v8/custom/V8WorkerContextCustom.cpp:
     39        (WebCore::SetTimeoutOrInterval):
     40        * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
     41        (WebCore::CALLBACK_FUNC_DECL):
     42
    1432009-07-07  Gregory Hughes  <gfhughesVO+webkit@gmail.com>
    244
  • trunk/WebCore/bindings/scripts/CodeGeneratorV8.pm

    r45574 r45603  
    563563        }
    564564        if ($nativeType eq "String") {
    565             $getterString = "ToString($getterString)";
     565            $getterString = "toString($getterString)";
    566566        }
    567567
     
    10541054         "#include \"config.h\"\n" .
    10551055         "#include \"V8Proxy.h\"\n" .
    1056          "#include \"v8_binding.h\"\n\n" .
     1056         "#include \"V8Binding.h\"\n\n" .
    10571057         "#undef LOG\n\n");
    10581058
     
    18001800    return "$value->NumberValue()" if $type eq "SVGNumber";
    18011801
    1802     return "ToInt32($value${maybeOkParam})" if $type eq "unsigned long" or $type eq "unsigned short" or $type eq "long";
     1802    return "toInt32($value${maybeOkParam})" if $type eq "unsigned long" or $type eq "unsigned short" or $type eq "long";
    18031803    return "static_cast<Range::CompareHow>($value->Int32Value())" if $type eq "CompareHow";
    18041804    return "static_cast<SVGPaint::SVGPaintType>($value->ToInt32()->Int32Value())" if $type eq "SVGPaintType";
    18051805
    1806     return "ToWebCoreString($value)" if $type eq "AtomicString" or $type eq "DOMUserData";
     1806    return "toWebCoreString($value)" if $type eq "AtomicString" or $type eq "DOMUserData";
    18071807    if ($type eq "DOMString") {
    1808         return "valueToStringWithNullCheck($value)" if $signature->extendedAttributes->{"ConvertNullToNullString"};
    1809         return "valueToStringWithNullOrUndefinedCheck($value)" if $signature->extendedAttributes->{"ConvertUndefinedOrNullToNullString"};
    1810         return "ToWebCoreString($value)";
     1808        return "toWebCoreStringWithNullCheck($value)" if $signature->extendedAttributes->{"ConvertNullToNullString"};
     1809        return "toWebCoreStringWithNullOrUndefinedCheck($value)" if $signature->extendedAttributes->{"ConvertUndefinedOrNullToNullString"};
     1810        return "toWebCoreString($value)";
    18111811    }
    18121812
  • trunk/WebCore/bindings/v8/V8Binding.h

    r45574 r45603  
    3232#define V8Binding_h
    3333
    34 // FIXME: This is a temporary forwarding header until all bindings have migrated
    35 // over and v8_binding actually becomes V8Binding.
    36 #include "v8_binding.h"
     34#include "MathExtras.h"
     35#include "PlatformString.h"
     36
     37#include <v8.h>
    3738
    3839namespace WebCore {
    3940
    40     // FIXME: Remove once migration is complete.
     41    // Convert v8 types to a WebCore::String. If the V8 string is not already
     42    // an external string then it is transformed into an external string at this
     43    // point to avoid repeated conversions.
     44    String v8StringToWebCoreString(v8::Handle<v8::String>, bool externalize);
     45    String v8ValueToWebCoreString(v8::Handle<v8::Value>);
     46
     47    // Convert v8 types to a WebCore::AtomicString.
     48    AtomicString v8StringToAtomicWebCoreString(v8::Handle<v8::String>);
     49    AtomicString v8ValueToAtomicWebCoreString(v8::Handle<v8::Value>);
     50
     51    // Convert a string to a V8 string.
     52    v8::Handle<v8::String> v8String(const String&);
     53
     54    inline String toString(const String& string)
     55    {
     56        return string;
     57    }
     58
     59    // Return a V8 external string that shares the underlying buffer with the given
     60    // WebCore string. The reference counting mechanism is used to keep the
     61    // underlying buffer alive while the string is still live in the V8 engine.
     62    v8::Local<v8::String> v8ExternalString(const String&);
     63
     64    // Convert a value to a 32-bit integer.  The conversion fails if the
     65    // value cannot be converted to an integer or converts to nan or to an infinity.
     66    inline int toInt32(v8::Handle<v8::Value> value, bool& ok)
     67    {
     68        ok = true;
     69
     70        // Fast case.  The value is already a 32-bit integer.
     71        if (value->IsInt32())
     72            return value->Int32Value();
     73
     74        // Can the value be converted to a number?
     75        v8::Local<v8::Number> numberObject = value->ToNumber();
     76        if (numberObject.IsEmpty()) {
     77            ok = false;
     78            return 0;
     79        }
     80
     81        // Does the value convert to nan or to an infinity?
     82        double numberValue = numberObject->Value();
     83        if (isnan(numberValue) || isinf(numberValue)) {
     84            ok = false;
     85            return 0;
     86        }
     87
     88        // Can the value be converted to a 32-bit integer?
     89        v8::Local<v8::Int32> intValue = value->ToInt32();
     90        if (intValue.IsEmpty()) {
     91            ok = false;
     92            return 0;
     93        }
     94
     95        // Return the result of the int32 conversion.
     96        return intValue->Value();
     97    }
     98
     99    // Convert a value to a 32-bit integer assuming the conversion cannot fail.
    41100    inline int toInt32(v8::Handle<v8::Value> value)
    42101    {
    43         return ToInt32(value);
     102        bool ok;
     103        return toInt32(value, ok);
    44104    }
    45105
     
    49109    }
    50110
    51     // FIXME: Remove once migration is complete.
    52     inline String toWebCoreString(v8::Handle<v8::Value> obj)
     111    // FIXME: Drop this in favor of the type specific v8ValueToWebCoreString when we rework the code generation.
     112    inline String toWebCoreString(v8::Handle<v8::Value> object)
    53113    {
    54         return ToWebCoreString(obj);
     114        return v8ValueToWebCoreString(object);
    55115    }
    56116
    57     // FIXME: Remove once migration is complete.
     117    // The string returned by this function is still owned by the argument
     118    // and will be deallocated when the argument is deallocated.
    58119    inline const uint16_t* fromWebCoreString(const String& str)
    59120    {
    60         return FromWebCoreString(str);
    61     }
    62 
    63     // FIXME: Rename valueToStringWithNullCheck once migration is complete.
    64     inline String toWebCoreStringWithNullCheck(v8::Handle<v8::Value> value)
    65     {
    66         return valueToStringWithNullCheck(value);
     121        return reinterpret_cast<const uint16_t*>(str.characters());
    67122    }
    68123
     
    76131        return value ? v8::True() : v8::False();
    77132    }
     133   
     134    inline String toWebCoreStringWithNullCheck(v8::Handle<v8::Value> value)
     135    {
     136        if (value->IsNull())
     137            return String();
     138        return v8ValueToWebCoreString(value);
     139    }
    78140
    79 }
     141    inline String toWebCoreStringWithNullOrUndefinedCheck(v8::Handle<v8::Value> value)
     142    {
     143        if (value->IsNull() || value->IsUndefined())
     144            return String();
     145        return toWebCoreString(value);
     146    }
     147 
     148    inline v8::Handle<v8::String> v8UndetectableString(const String& str)
     149    {
     150        return v8::String::NewUndetectable(fromWebCoreString(str), str.length());
     151    }
     152
     153    inline v8::Handle<v8::Value> v8StringOrNull(const String& str)
     154    {
     155        return str.isNull() ? v8::Handle<v8::Value>(v8::Null()) : v8::Handle<v8::Value>(v8String(str));
     156    }
     157
     158    inline v8::Handle<v8::Value> v8StringOrUndefined(const String& str)
     159    {
     160        return str.isNull() ? v8::Handle<v8::Value>(v8::Undefined()) : v8::Handle<v8::Value>(v8String(str));
     161    }
     162
     163    inline v8::Handle<v8::Value> v8StringOrFalse(const String& str)
     164    {
     165        return str.isNull() ? v8::Handle<v8::Value>(v8::False()) : v8::Handle<v8::Value>(v8String(str));
     166    }
     167} // namespace WebCore
    80168
    81169#endif // V8Binding_h
  • trunk/WebCore/bindings/v8/V8LazyEventListener.cpp

    r45574 r45603  
    111111                ASSERT(value->IsFunction());
    112112                v8::Local<v8::Function> listenerFunction = v8::Local<v8::Function>::Cast(value);
    113                 listenerFunction->SetName(v8::String::New(FromWebCoreString(m_functionName), m_functionName.length()));
     113                listenerFunction->SetName(v8::String::New(fromWebCoreString(m_functionName), m_functionName.length()));
    114114
    115115                m_listener = v8::Persistent<v8::Function>::New(listenerFunction);
  • trunk/WebCore/bindings/v8/V8Proxy.cpp

    r45596 r45603  
    708708    v8::Handle<v8::String> errorMessageString = message->Get();
    709709    ASSERT(!errorMessageString.IsEmpty());
    710     String errorMessage = ToWebCoreString(errorMessageString);
     710    String errorMessage = toWebCoreString(errorMessageString);
    711711
    712712    v8::Handle<v8::Value> resourceName = message->GetScriptResourceName();
    713713    bool useURL = resourceName.IsEmpty() || !resourceName->IsString();
    714     String resourceNameString = useURL ? frame->document()->url() : ToWebCoreString(resourceName);
     714    String resourceNameString = useURL ? frame->document()->url() : toWebCoreString(resourceName);
    715715    JavaScriptConsoleMessage consoleMessage(errorMessage, resourceNameString, message->GetLineNumber());
    716716    ConsoleMessageManager::addMessage(page, consoleMessage);
     
    966966v8::Handle<v8::Script> V8Proxy::compileScript(v8::Handle<v8::String> code, const String& fileName, int baseLine)
    967967{
    968     const uint16_t* fileNameString = FromWebCoreString(fileName);
     968    const uint16_t* fileNameString = fromWebCoreString(fileName);
    969969    v8::Handle<v8::String> name = v8::String::New(fileNameString, fileName.length());
    970970    v8::Handle<v8::Integer> line = v8::Integer::New(baseLine);
     
    32093209    if (frameSourceName.IsEmpty())
    32103210        return String();
    3211     return ToWebCoreString(v8::Debug::Call(frameSourceName));
     3211    return toWebCoreString(v8::Debug::Call(frameSourceName));
    32123212}
    32133213
  • trunk/WebCore/bindings/v8/WorkerContextExecutionProxy.cpp

    r45574 r45603  
    7272    v8::Handle<v8::String> errorMessageString = message->Get();
    7373    ASSERT(!errorMessageString.IsEmpty());
    74     String errorMessage = ToWebCoreString(errorMessageString);
     74    String errorMessage = toWebCoreString(errorMessageString);
    7575   
    7676    v8::Handle<v8::Value> resourceName = message->GetScriptResourceName();
    7777    bool useURL = (resourceName.IsEmpty() || !resourceName->IsString());
    78     String resourceNameString = useURL ? workerContext->url() : ToWebCoreString(resourceName);
     78    String resourceNameString = useURL ? workerContext->url() : toWebCoreString(resourceName);
    7979   
    8080    workerContext->addMessage(ConsoleDestination, JSMessageSource, ErrorMessageLevel, errorMessage, message->GetLineNumber(), resourceNameString);
  • trunk/WebCore/bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp

    r45574 r45603  
    202202        return notHandledByInterceptor();
    203203
    204     String propertyValue = valueToStringWithNullCheck(value);
     204    String propertyValue = toWebCoreStringWithNullCheck(value);
    205205    if (propInfo->hadPixelOrPosPrefix)
    206206        propertyValue.append("px");
  • trunk/WebCore/bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp

    r45574 r45603  
    106106    case 1:
    107107        if (args[0]->IsString())
    108             context->setStrokeColor(ToWebCoreString(args[0]));
     108            context->setStrokeColor(toWebCoreString(args[0]));
    109109        else
    110110            context->setStrokeColor(toFloat(args[0]));
     
    112112    case 2:
    113113        if (args[0]->IsString())
    114             context->setStrokeColor(ToWebCoreString(args[0]), toFloat(args[1]));
     114            context->setStrokeColor(toWebCoreString(args[0]), toFloat(args[1]));
    115115        else
    116116            context->setStrokeColor(toFloat(args[0]), toFloat(args[1]));
     
    136136    case 1:
    137137        if (args[0]->IsString())
    138             context->setFillColor(ToWebCoreString(args[0]));
     138            context->setFillColor(toWebCoreString(args[0]));
    139139        else
    140140            context->setFillColor(toFloat(args[0]));
     
    142142    case 2:
    143143        if (args[0]->IsString())
    144             context->setFillColor(ToWebCoreString(args[0]), toFloat(args[1]));
     144            context->setFillColor(toWebCoreString(args[0]), toFloat(args[1]));
    145145        else
    146146            context->setFillColor(toFloat(args[0]), toFloat(args[1]));
     
    185185    case 4:
    186186        if (args[3]->IsString())
    187             context->setShadow(toFloat(args[0]), toFloat(args[1]), toFloat(args[2]), ToWebCoreString(args[3]));
     187            context->setShadow(toFloat(args[0]), toFloat(args[1]), toFloat(args[2]), toWebCoreString(args[3]));
    188188        else
    189189            context->setShadow(toFloat(args[0]), toFloat(args[1]), toFloat(args[2]), toFloat(args[3]));
     
    191191    case 5:
    192192        if (args[3]->IsString())
    193             context->setShadow(toFloat(args[0]), toFloat(args[1]), toFloat(args[2]), ToWebCoreString(args[3]), toFloat(args[4]));
     193            context->setShadow(toFloat(args[0]), toFloat(args[1]), toFloat(args[2]), toWebCoreString(args[3]), toFloat(args[4]));
    194194        else
    195195            context->setShadow(toFloat(args[0]), toFloat(args[1]), toFloat(args[2]), toFloat(args[3]), toFloat(args[4]));
     
    292292    if (V8HTMLImageElement::HasInstance(arg)) {
    293293        HTMLImageElement* image_element = V8Proxy::convertDOMWrapperToNode<HTMLImageElement>(arg);
    294         context->drawImageFromRect(image_element,  toFloat(args[1]), toFloat(args[2]), toFloat(args[3]), toFloat(args[4]), toFloat(args[5]), toFloat(args[6]), toFloat(args[7]), toFloat(args[8]), ToWebCoreString(args[9]));
     294        context->drawImageFromRect(image_element,  toFloat(args[1]), toFloat(args[2]), toFloat(args[3]), toFloat(args[4]), toFloat(args[5]), toFloat(args[6]), toFloat(args[7]), toFloat(args[8]), toWebCoreString(args[9]));
    295295    } else
    296296        V8Proxy::throwError(V8Proxy::TypeError, "drawImageFromRect: Invalid type of arguments");
     
    309309        HTMLImageElement* image_element = V8Proxy::convertDOMWrapperToNode<HTMLImageElement>(arg);
    310310        ExceptionCode ec = 0;
    311         RefPtr<CanvasPattern> pattern = context->createPattern(image_element, valueToStringWithNullCheck(args[1]), ec);
     311        RefPtr<CanvasPattern> pattern = context->createPattern(image_element, toWebCoreStringWithNullCheck(args[1]), ec);
    312312        if (ec != 0) {
    313313            V8Proxy::setDOMException(ec);
     
    320320        HTMLCanvasElement* canvas_element = V8Proxy::convertDOMWrapperToNode<HTMLCanvasElement>(arg);
    321321        ExceptionCode ec = 0;
    322         RefPtr<CanvasPattern> pattern = context->createPattern(canvas_element, valueToStringWithNullCheck(args[1]), ec);
     322        RefPtr<CanvasPattern> pattern = context->createPattern(canvas_element, toWebCoreStringWithNullCheck(args[1]), ec);
    323323        if (ec != 0) {
    324324            V8Proxy::setDOMException(ec);
     
    346346    }
    347347
    348     String text = ToWebCoreString(args[0]);
     348    String text = toWebCoreString(args[0]);
    349349    float x = toFloat(args[1]);
    350350    float y = toFloat(args[2]);
     
    372372    }
    373373
    374     String text = ToWebCoreString(args[0]);
     374    String text = toWebCoreString(args[0]);
    375375    float x = toFloat(args[1]);
    376376    float y = toFloat(args[2]);
  • trunk/WebCore/bindings/v8/custom/V8CustomXPathNSResolver.cpp

    r45574 r45603  
    8181        return String();
    8282
    83     return valueToStringWithNullCheck(retval);
     83    return toWebCoreStringWithNullCheck(retval);
    8484}
    8585
  • trunk/WebCore/bindings/v8/custom/V8DOMWindowCustom.cpp

    r45574 r45603  
    278278        if (V8Proxy::isWrapperOfType(args[1], V8ClassIndex::MESSAGEPORT))
    279279            port = V8Proxy::convertToNativeObject<MessagePort>(V8ClassIndex::MESSAGEPORT, args[1]);
    280         targetOrigin = valueToStringWithNullOrUndefinedCheck(args[2]);
     280        targetOrigin = toWebCoreStringWithNullOrUndefinedCheck(args[2]);
    281281    } else {
    282         targetOrigin = valueToStringWithNullOrUndefinedCheck(args[1]);
     282        targetOrigin = toWebCoreStringWithNullOrUndefinedCheck(args[1]);
    283283    }
    284284
     
    563563        return v8::Undefined();
    564564
    565     String url = valueToStringWithNullOrUndefinedCheck(args[0]);
     565    String url = toWebCoreStringWithNullOrUndefinedCheck(args[0]);
    566566    v8::Local<v8::Value> dialogArgs = args[1];
    567     String featureArgs = valueToStringWithNullOrUndefinedCheck(args[2]);
     567    String featureArgs = toWebCoreStringWithNullOrUndefinedCheck(args[2]);
    568568
    569569    const HashMap<String, String> features = parseModalDialogFeatures(featureArgs);
     
    652652        return v8::Undefined();
    653653
    654     String urlString = valueToStringWithNullOrUndefinedCheck(args[0]);
     654    String urlString = toWebCoreStringWithNullOrUndefinedCheck(args[0]);
    655655    AtomicString frameName = (args[1]->IsUndefined() || args[1]->IsNull()) ? "_blank" : AtomicString(toWebCoreString(args[1]));
    656656
     
    701701    // so we can restore the values we may not want to overwrite after
    702702    // we do the multiple monitor fixes.
    703     WindowFeatures rawFeatures(valueToStringWithNullOrUndefinedCheck(args[2]));
     703    WindowFeatures rawFeatures(toWebCoreStringWithNullOrUndefinedCheck(args[2]));
    704704    WindowFeatures windowFeatures(rawFeatures);
    705705    FloatRect screenRect = screenAvailableRect(page->mainFrame()->view());
  • trunk/WebCore/bindings/v8/custom/V8HTMLCanvasElementCustom.cpp

    r45574 r45603  
    4444    v8::Handle<v8::Value> holder = args.Holder();
    4545    HTMLCanvasElement* imp = V8Proxy::convertDOMWrapperToNode<HTMLCanvasElement>(holder);
    46     String contextId = ToWebCoreString(args[0]);
     46    String contextId = toWebCoreString(args[0]);
    4747    CanvasRenderingContext2D* result = imp->getContext(contextId);
    4848    return V8Proxy::convertToV8Object(V8ClassIndex::CANVASRENDERINGCONTEXT2D, result);
  • trunk/WebCore/bindings/v8/custom/V8HTMLIFrameElementCustom.cpp

    r45574 r45603  
    4141{
    4242    HTMLIFrameElement* iframe = V8Proxy::convertDOMWrapperToNode<HTMLIFrameElement>(info.Holder());
    43     String v = valueToStringWithNullCheck(value);
     43    String v = toWebCoreStringWithNullCheck(value);
    4444
    4545    if (!allowSettingFrameSrcToJavascriptUrl(iframe, v))
  • trunk/WebCore/bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp

    r45574 r45603  
    6868        bool ok;
    6969        v8::TryCatch try_catch;
    70         int index = ToInt32(args[1], ok);
     70        int index = toInt32(args[1], ok);
    7171
    7272        if (try_catch.HasCaught())
  • trunk/WebCore/bindings/v8/custom/V8HTMLSelectElementCustom.cpp

    r45574 r45603  
    5757    }
    5858
    59     imp->remove(ToInt32(args[0]));
     59    imp->remove(toInt32(args[0]));
    6060    return v8::Undefined();
    6161}
  • trunk/WebCore/bindings/v8/custom/V8SQLTransactionCustom.cpp

    r45574 r45603  
    5555    }
    5656
    57     String statement = ToWebCoreString(args[0]);
     57    String statement = toWebCoreString(args[0]);
    5858
    5959    Vector<SQLValue> sqlValues;
     
    7676                sqlValues.append(SQLValue(value->NumberValue()));
    7777            else
    78                 sqlValues.append(SQLValue(ToWebCoreString(value)));
     78                sqlValues.append(SQLValue(toWebCoreString(value)));
    7979        }
    8080    }
  • trunk/WebCore/bindings/v8/custom/V8WorkerContextCustom.cpp

    r45574 r45603  
    106106
    107107    if (function->IsString()) {
    108         WebCore::String stringFunction = ToWebCoreString(function);
     108        WebCore::String stringFunction = toWebCoreString(function);
    109109        timerId = DOMTimer::install(workerContext, new ScheduledAction(stringFunction, workerContext->url()), timeout, singleShot);
    110110    } else if (function->IsFunction()) {
  • trunk/WebCore/bindings/v8/custom/V8XMLHttpRequestCustom.cpp

    r45574 r45603  
    346346    String user, passwd;
    347347    if (args.Length() >= 4 && !args[3]->IsUndefined()) {
    348         user = valueToStringWithNullCheck(args[3]);
     348        user = toWebCoreStringWithNullCheck(args[3]);
    349349
    350350        if (args.Length() >= 5 && !args[4]->IsUndefined()) {
    351             passwd = valueToStringWithNullCheck(args[4]);
     351            passwd = toWebCoreStringWithNullCheck(args[4]);
    352352            xmlHttpRequest->open(method, url, async, user, passwd, ec);
    353353        } else
     
    385385            xmlHttpRequest->send(document, ec);
    386386        } else
    387             xmlHttpRequest->send(valueToStringWithNullCheck(arg), ec);
     387            xmlHttpRequest->send(toWebCoreStringWithNullCheck(arg), ec);
    388388    }
    389389
Note: See TracChangeset for help on using the changeset viewer.