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

Side by Side Diff: Source/modules/fetch/ResponseTest.cpp

Issue 1107793002: Oilpan: have DOMException be on the heap by default. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 8 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "modules/fetch/Response.h" 6 #include "modules/fetch/Response.h"
7 7
8 #include "bindings/core/v8/ExceptionState.h" 8 #include "bindings/core/v8/ExceptionState.h"
9 #include "bindings/core/v8/ScriptState.h" 9 #include "bindings/core/v8/ScriptState.h"
10 #include "core/dom/Document.h" 10 #include "core/dom/Document.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 ~BlobHandleCreatorClient() override { } 59 ~BlobHandleCreatorClient() override { }
60 DEFINE_INLINE_VIRTUAL_TRACE() 60 DEFINE_INLINE_VIRTUAL_TRACE()
61 { 61 {
62 visitor->trace(m_exception); 62 visitor->trace(m_exception);
63 BodyStreamBuffer::BlobHandleCreatorClient::trace(visitor); 63 BodyStreamBuffer::BlobHandleCreatorClient::trace(visitor);
64 } 64 }
65 void didCreateBlobHandle(PassRefPtr<BlobDataHandle> blobHandle) override 65 void didCreateBlobHandle(PassRefPtr<BlobDataHandle> blobHandle) override
66 { 66 {
67 m_blobHandle = blobHandle; 67 m_blobHandle = blobHandle;
68 } 68 }
69 void didFail(PassRefPtrWillBeRawPtr<DOMException> exception) override 69 void didFail(DOMException* exception) override
70 { 70 {
71 m_exception = exception; 71 m_exception = exception;
72 } 72 }
73 PassRefPtr<BlobDataHandle> blobHandle() 73 PassRefPtr<BlobDataHandle> blobHandle()
74 { 74 {
75 return m_blobHandle; 75 return m_blobHandle;
76 } 76 }
77 PassRefPtrWillBeRawPtr<DOMException> exception() 77 DOMException* exception()
78 { 78 {
79 return m_exception; 79 return m_exception;
80 } 80 }
81 81
82 private: 82 private:
83 RefPtr<BlobDataHandle> m_blobHandle; 83 RefPtr<BlobDataHandle> m_blobHandle;
84 RefPtrWillBeMember<DOMException> m_exception; 84 Member<DOMException> m_exception;
85 }; 85 };
86 86
87 87
88 class ServiceWorkerResponseTest : public ::testing::Test { 88 class ServiceWorkerResponseTest : public ::testing::Test {
89 public: 89 public:
90 ServiceWorkerResponseTest() 90 ServiceWorkerResponseTest()
91 : m_page(DummyPageHolder::create(IntSize(1, 1))) { } 91 : m_page(DummyPageHolder::create(IntSize(1, 1))) { }
92 92
93 ScriptState* scriptState() { return ScriptState::forMainWorld(m_page->docume nt().frame()); } 93 ScriptState* scriptState() { return ScriptState::forMainWorld(m_page->docume nt().frame()); }
94 ExecutionContext* executionContext() { return scriptState()->executionContex t(); } 94 ExecutionContext* executionContext() { return scriptState()->executionContex t(); }
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 393
394 EXPECT_EQ(0, canceller->counter()); 394 EXPECT_EQ(0, canceller->counter());
395 response->bufferForTest()->cancel(); 395 response->bufferForTest()->cancel();
396 EXPECT_EQ(0, canceller->counter()); 396 EXPECT_EQ(0, canceller->counter());
397 clonedResponse->bufferForTest()->cancel(); 397 clonedResponse->bufferForTest()->cancel();
398 EXPECT_EQ(1, canceller->counter()); 398 EXPECT_EQ(1, canceller->counter());
399 } 399 }
400 400
401 } // namespace 401 } // namespace
402 } // namespace blink 402 } // namespace blink
OLDNEW
« no previous file with comments | « Source/modules/fetch/BodyStreamBufferTest.cpp ('k') | Source/modules/geofencing/GeofencingError.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698