| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2006, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2006, 2008 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2005-2007 Alexey Proskuryakov <ap@webkit.org> | 3 * Copyright (C) 2005-2007 Alexey Proskuryakov <ap@webkit.org> |
| 4 * Copyright (C) 2007, 2008 Julien Chaffraix <jchaffraix@webkit.org> | 4 * Copyright (C) 2007, 2008 Julien Chaffraix <jchaffraix@webkit.org> |
| 5 * Copyright (C) 2008, 2011 Google Inc. All rights reserved. | 5 * Copyright (C) 2008, 2011 Google Inc. All rights reserved. |
| 6 * Copyright (C) 2012 Intel Corporation | 6 * Copyright (C) 2012 Intel Corporation |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Lesser General Public | 9 * modify it under the terms of the GNU Lesser General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 : m_xhr(xhr) | 310 : m_xhr(xhr) |
| 311 , m_loader(FileReaderLoader::ReadByClient, this) | 311 , m_loader(FileReaderLoader::ReadByClient, this) |
| 312 { | 312 { |
| 313 m_loader.start(m_xhr->executionContext(), handle); | 313 m_loader.start(m_xhr->executionContext(), handle); |
| 314 } | 314 } |
| 315 | 315 |
| 316 RawPtrWillBeMember<XMLHttpRequest> m_xhr; | 316 RawPtrWillBeMember<XMLHttpRequest> m_xhr; |
| 317 FileReaderLoader m_loader; | 317 FileReaderLoader m_loader; |
| 318 }; | 318 }; |
| 319 | 319 |
| 320 PassRefPtrWillBeRawPtr<XMLHttpRequest> XMLHttpRequest::create(ExecutionContext*
context, PassRefPtr<SecurityOrigin> securityOrigin) | 320 PassRefPtrWillBeRawPtr<XMLHttpRequest> XMLHttpRequest::create(ScriptState* scrip
tState) |
| 321 { | 321 { |
| 322 RefPtr<SecurityOrigin> securityOrigin; |
| 323 ExecutionContext* context = scriptState->executionContext(); |
| 324 if (context->isDocument()) { |
| 325 DOMWrapperWorld& world = scriptState->world(); |
| 326 securityOrigin = world.isIsolatedWorld() ? world.isolatedWorldSecurityOr
igin() : nullptr; |
| 327 } |
| 322 RefPtrWillBeRawPtr<XMLHttpRequest> xmlHttpRequest = adoptRefWillBeNoop(new X
MLHttpRequest(context, securityOrigin)); | 328 RefPtrWillBeRawPtr<XMLHttpRequest> xmlHttpRequest = adoptRefWillBeNoop(new X
MLHttpRequest(context, securityOrigin)); |
| 323 xmlHttpRequest->suspendIfNeeded(); | 329 xmlHttpRequest->suspendIfNeeded(); |
| 324 | 330 |
| 325 return xmlHttpRequest.release(); | 331 return xmlHttpRequest.release(); |
| 326 } | 332 } |
| 327 | 333 |
| 334 PassRefPtrWillBeRawPtr<XMLHttpRequest> XMLHttpRequest::create(ExecutionContext*
context) |
| 335 { |
| 336 RefPtrWillBeRawPtr<XMLHttpRequest> xmlHttpRequest = adoptRefWillBeNoop(new X
MLHttpRequest(context, nullptr)); |
| 337 xmlHttpRequest->suspendIfNeeded(); |
| 338 |
| 339 return xmlHttpRequest.release(); |
| 340 } |
| 341 |
| 328 XMLHttpRequest::XMLHttpRequest(ExecutionContext* context, PassRefPtr<SecurityOri
gin> securityOrigin) | 342 XMLHttpRequest::XMLHttpRequest(ExecutionContext* context, PassRefPtr<SecurityOri
gin> securityOrigin) |
| 329 : ActiveDOMObject(context) | 343 : ActiveDOMObject(context) |
| 330 , m_timeoutMilliseconds(0) | 344 , m_timeoutMilliseconds(0) |
| 331 , m_loaderIdentifier(0) | 345 , m_loaderIdentifier(0) |
| 332 , m_state(UNSENT) | 346 , m_state(UNSENT) |
| 333 , m_lengthDownloadedToFile(0) | 347 , m_lengthDownloadedToFile(0) |
| 334 , m_receivedLength(0) | 348 , m_receivedLength(0) |
| 335 , m_exceptionCode(0) | 349 , m_exceptionCode(0) |
| 336 , m_progressEventThrottle(this) | 350 , m_progressEventThrottle(this) |
| 337 , m_responseTypeCode(ResponseTypeDefault) | 351 , m_responseTypeCode(ResponseTypeDefault) |
| (...skipping 1536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1874 visitor->trace(m_responseDocumentParser); | 1888 visitor->trace(m_responseDocumentParser); |
| 1875 visitor->trace(m_progressEventThrottle); | 1889 visitor->trace(m_progressEventThrottle); |
| 1876 visitor->trace(m_upload); | 1890 visitor->trace(m_upload); |
| 1877 visitor->trace(m_blobLoader); | 1891 visitor->trace(m_blobLoader); |
| 1878 XMLHttpRequestEventTarget::trace(visitor); | 1892 XMLHttpRequestEventTarget::trace(visitor); |
| 1879 DocumentParserClient::trace(visitor); | 1893 DocumentParserClient::trace(visitor); |
| 1880 ActiveDOMObject::trace(visitor); | 1894 ActiveDOMObject::trace(visitor); |
| 1881 } | 1895 } |
| 1882 | 1896 |
| 1883 } // namespace blink | 1897 } // namespace blink |
| OLD | NEW |