OLD | NEW |
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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 | 58 |
59 RefPtr<SecurityOrigin> securityOrigin; | 59 RefPtr<SecurityOrigin> securityOrigin; |
60 if (context->isDocument()) { | 60 if (context->isDocument()) { |
61 if (DOMWrapperWorld* world = isolatedWorldForEnteredContext()) | 61 if (DOMWrapperWorld* world = isolatedWorldForEnteredContext()) |
62 securityOrigin = world->isolatedWorldSecurityOrigin(); | 62 securityOrigin = world->isolatedWorldSecurityOrigin(); |
63 } | 63 } |
64 | 64 |
65 RefPtr<XMLHttpRequest> xmlHttpRequest = XMLHttpRequest::create(context, secu
rityOrigin); | 65 RefPtr<XMLHttpRequest> xmlHttpRequest = XMLHttpRequest::create(context, secu
rityOrigin); |
66 | 66 |
67 v8::Handle<v8::Object> wrapper = args.Holder(); | 67 v8::Handle<v8::Object> wrapper = args.Holder(); |
68 V8DOMWrapper::associateObjectWithWrapper<V8XMLHttpRequest>(xmlHttpRequest.re
lease(), &info, wrapper, args.GetIsolate(), WrapperConfiguration::Dependent); | 68 V8DOMWrapper::associateObjectWithWrapper<V8XMLHttpRequest>(xmlHttpRequest.re
lease(), &wrapperTypeInfo, wrapper, args.GetIsolate(), WrapperConfiguration::Dep
endent); |
69 args.GetReturnValue().Set(wrapper); | 69 args.GetReturnValue().Set(wrapper); |
70 } | 70 } |
71 | 71 |
72 void V8XMLHttpRequest::responseTextAttributeGetterCustom(v8::Local<v8::String> n
ame, const v8::PropertyCallbackInfo<v8::Value>& info) | 72 void V8XMLHttpRequest::responseTextAttributeGetterCustom(v8::Local<v8::String> n
ame, const v8::PropertyCallbackInfo<v8::Value>& info) |
73 { | 73 { |
74 XMLHttpRequest* xmlHttpRequest = V8XMLHttpRequest::toNative(info.Holder()); | 74 XMLHttpRequest* xmlHttpRequest = V8XMLHttpRequest::toNative(info.Holder()); |
75 ExceptionState es(info.GetIsolate()); | 75 ExceptionState es(info.GetIsolate()); |
76 ScriptValue text = xmlHttpRequest->responseText(es); | 76 ScriptValue text = xmlHttpRequest->responseText(es); |
77 if (es.throwIfNeeded()) | 77 if (es.throwIfNeeded()) |
78 return; | 78 return; |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 ASSERT(arrayBufferView); | 247 ASSERT(arrayBufferView); |
248 xmlHttpRequest->send(arrayBufferView, es); | 248 xmlHttpRequest->send(arrayBufferView, es); |
249 } else | 249 } else |
250 xmlHttpRequest->send(toWebCoreStringWithNullCheck(arg), es); | 250 xmlHttpRequest->send(toWebCoreStringWithNullCheck(arg), es); |
251 } | 251 } |
252 | 252 |
253 es.throwIfNeeded(); | 253 es.throwIfNeeded(); |
254 } | 254 } |
255 | 255 |
256 } // namespace WebCore | 256 } // namespace WebCore |
OLD | NEW |