Changeset 68984 in webkit


Ignore:
Timestamp:
Oct 3, 2010 1:19:34 AM (14 years ago)
Author:
abarth@webkit.org
Message:

2010-10-03 Adam Barth <abarth@webkit.org>

Reviewed by Holger Freyther.

All the WebSocket tests crash
https://bugs.webkit.org/show_bug.cgi?id=47055

This code attempts to hold onto temporary objects using references.
That doesn't work in C++. Instead, we need to actually store the
objects somewhere.

  • bindings/js/JSWebSocketCustom.cpp: (WebCore::JSWebSocketConstructor::constructJSWebSocket):
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r68978 r68984  
     12010-10-03  Adam Barth  <abarth@webkit.org>
     2
     3        Reviewed by Holger Freyther.
     4
     5        All the WebSocket tests crash
     6        https://bugs.webkit.org/show_bug.cgi?id=47055
     7
     8        This code attempts to hold onto temporary objects using references.
     9        That doesn't work in C++. Instead, we need to actually store the
     10        objects somewhere.
     11
     12        * bindings/js/JSWebSocketCustom.cpp:
     13        (WebCore::JSWebSocketConstructor::constructJSWebSocket):
     14
    1152010-10-02  Diego Gonzalez  <diegohcg@webkit.org>
    216
  • trunk/WebCore/bindings/js/JSWebSocketCustom.cpp

    r61390 r68984  
    5555        return throwVMError(exec, createSyntaxError(exec, "Not enough arguments"));
    5656
    57     const String& urlString = ustringToString(exec->argument(0).toString(exec));
     57    String urlString = ustringToString(exec->argument(0).toString(exec));
    5858    if (exec->hadException())
    5959        return throwVMError(exec, createSyntaxError(exec, "wrong URL"));
    60     const KURL& url = context->completeURL(urlString);
     60    KURL url = context->completeURL(urlString);
    6161    RefPtr<WebSocket> webSocket = WebSocket::create(context);
    6262    ExceptionCode ec = 0;
     
    6464        webSocket->connect(url, ec);
    6565    else {
    66         const String& protocol = ustringToString(exec->argument(1).toString(exec));
     66        String protocol = ustringToString(exec->argument(1).toString(exec));
    6767        if (exec->hadException())
    6868            return JSValue::encode(JSValue());
Note: See TracChangeset for help on using the changeset viewer.