Bug 24727 - Need to upstream V8XMLHttpRequest*
Summary: Need to upstream V8XMLHttpRequest*
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: David Levin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-20 14:38 PDT by David Levin
Modified: 2009-03-22 00:36 PDT (History)
1 user (show)

See Also:


Attachments
Proposed fix. (40.07 KB, patch)
2009-03-20 14:40 PDT, David Levin
dglazkov: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Levin 2009-03-20 14:38:25 PDT
See summary.
Comment 1 David Levin 2009-03-20 14:40:16 PDT
Created attachment 28801 [details]
Proposed fix.
Comment 2 Dimitri Glazkov (Google) 2009-03-21 20:34:41 PDT
Comment on attachment 28801 [details]
Proposed fix.

Proper design for all these hidden dependency helpers is out of scope for this scrubbing, so LGTM, good to land after these changes:

> +    if (ec) {
> +        V8Proxy::SetDOMException(ec);
> +        return v8::Handle<v8::Value>();
> +    }

I have a helper in V8Proxy.h that might be useful here, throwError

> +    if (ec) {
> +        V8Proxy::SetDOMException(ec);
> +        return v8::Handle<v8::Value>();
> +    }

... and here.

> +    if (args.Length() < 2) {
> +        V8Proxy::ThrowError(V8Proxy::SYNTAX_ERROR, "Not enough arguments");
> +        return v8::Undefined();
> +    }

... and here.

> +    if (ec) {
> +        V8Proxy::SetDOMException(ec);
> +        return v8::Handle<v8::Value>();
> +    }

... and here.

> +    INC_STATS("DOM.XMLHttpRequest.getResponseHeader()");
> +    if (args.Length() < 1) {
> +        V8Proxy::ThrowError(V8Proxy::SYNTAX_ERROR, "Not enough arguments");
> +        return v8::Undefined();
> +    }

Ditto.

> +    if (ec) {
> +        V8Proxy::SetDOMException(ec);
> +        return v8::Handle<v8::Value>();
> +    }
> +    return v8StringOrNull(result);
> +}

Same thing.

> +    if (args.Length() < 1) {
> +        V8Proxy::ThrowError(V8Proxy::SYNTAX_ERROR, "Not enough arguments");
> +        return v8::Undefined();
> +    }

Analogously.
Comment 3 David Levin 2009-03-22 00:36:31 PDT
Committed as r41898.