Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(114)

Side by Side Diff: Source/bindings/v8/custom/V8XMLHttpRequestCustom.cpp

Issue 18778002: Inherit EventTarget interface instead of duplicating its code (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/bindings/v8/custom/V8WebKitPointCustom.cpp ('k') | Source/core/css/FontLoader.idl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008, 2009, 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2008, 2009, 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 54
55 RefPtr<SecurityOrigin> securityOrigin; 55 RefPtr<SecurityOrigin> securityOrigin;
56 if (context->isDocument()) { 56 if (context->isDocument()) {
57 if (DOMWrapperWorld* world = isolatedWorldForEnteredContext()) 57 if (DOMWrapperWorld* world = isolatedWorldForEnteredContext())
58 securityOrigin = world->isolatedWorldSecurityOrigin(); 58 securityOrigin = world->isolatedWorldSecurityOrigin();
59 } 59 }
60 60
61 RefPtr<XMLHttpRequest> xmlHttpRequest = XMLHttpRequest::create(context, secu rityOrigin); 61 RefPtr<XMLHttpRequest> xmlHttpRequest = XMLHttpRequest::create(context, secu rityOrigin);
62 62
63 v8::Handle<v8::Object> wrapper = args.Holder(); 63 v8::Handle<v8::Object> wrapper = args.Holder();
64 V8DOMWrapper::associateObjectWithWrapper(xmlHttpRequest.release(), &info, wr apper, args.GetIsolate(), WrapperConfiguration::Dependent); 64 V8DOMWrapper::associateObjectWithWrapper<V8XMLHttpRequest>(xmlHttpRequest.re lease(), &info, wrapper, args.GetIsolate(), WrapperConfiguration::Dependent);
65 args.GetReturnValue().Set(wrapper); 65 args.GetReturnValue().Set(wrapper);
66 } 66 }
67 67
68 void V8XMLHttpRequest::responseTextAttrGetterCustom(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) 68 void V8XMLHttpRequest::responseTextAttrGetterCustom(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
69 { 69 {
70 XMLHttpRequest* xmlHttpRequest = V8XMLHttpRequest::toNative(info.Holder()); 70 XMLHttpRequest* xmlHttpRequest = V8XMLHttpRequest::toNative(info.Holder());
71 ExceptionCode ec = 0; 71 ExceptionCode ec = 0;
72 ScriptValue text = xmlHttpRequest->responseText(ec); 72 ScriptValue text = xmlHttpRequest->responseText(ec);
73 if (ec) { 73 if (ec) {
74 setDOMException(ec, info.GetIsolate()); 74 setDOMException(ec, info.GetIsolate());
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 xmlHttpRequest->send(toWebCoreStringWithNullCheck(arg), ec); 226 xmlHttpRequest->send(toWebCoreStringWithNullCheck(arg), ec);
227 } 227 }
228 228
229 if (!ec) 229 if (!ec)
230 return; 230 return;
231 231
232 setDOMException(ec, args.GetIsolate()); 232 setDOMException(ec, args.GetIsolate());
233 } 233 }
234 234
235 } // namespace WebCore 235 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/v8/custom/V8WebKitPointCustom.cpp ('k') | Source/core/css/FontLoader.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698