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

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/ToV8Test.cpp

Issue 1929493002: Remove unnecessary uses of GarbageCollectedFinalized<>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add two leftover classes needing same treatment Created 4 years, 7 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/WindowProxyManager.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "bindings/core/v8/ToV8.h" 5 #include "bindings/core/v8/ToV8.h"
6 6
7 #include "bindings/core/v8/V8Binding.h" 7 #include "bindings/core/v8/V8Binding.h"
8 #include "bindings/core/v8/V8BindingForTesting.h" 8 #include "bindings/core/v8/V8BindingForTesting.h"
9 #include "core/testing/GarbageCollectedScriptWrappable.h" 9 #include "core/testing/GarbageCollectedScriptWrappable.h"
10 #include "platform/heap/Heap.h" 10 #include "platform/heap/Heap.h"
(...skipping 22 matching lines...) Expand all
33 String actualString = toCoreString(actual->ToString(m_scope.context()).T oLocalChecked()); 33 String actualString = toCoreString(actual->ToString(m_scope.context()).T oLocalChecked());
34 if (String(expected) != actualString) { 34 if (String(expected) != actualString) {
35 ADD_FAILURE_AT(path, lineNumber) << "toV8 returns an incorrect value .\n Actual: " << actualString.utf8().data() << "\nExpected: " << expected; 35 ADD_FAILURE_AT(path, lineNumber) << "toV8 returns an incorrect value .\n Actual: " << actualString.utf8().data() << "\nExpected: " << expected;
36 return; 36 return;
37 } 37 }
38 } 38 }
39 39
40 V8TestingScope m_scope; 40 V8TestingScope m_scope;
41 }; 41 };
42 42
43 class GarbageCollectedHolder : public GarbageCollectedFinalized<GarbageCollected Holder> { 43 class GarbageCollectedHolder : public GarbageCollected<GarbageCollectedHolder> {
44 public: 44 public:
45 GarbageCollectedHolder(GarbageCollectedScriptWrappable* scriptWrappable) 45 GarbageCollectedHolder(GarbageCollectedScriptWrappable* scriptWrappable)
46 : m_scriptWrappable(scriptWrappable) { } 46 : m_scriptWrappable(scriptWrappable) { }
47 47
48 DEFINE_INLINE_TRACE() { visitor->trace(m_scriptWrappable); } 48 DEFINE_INLINE_TRACE() { visitor->trace(m_scriptWrappable); }
49 49
50 // This should be public in order to access a Member<X> object. 50 // This should be public in order to access a Member<X> object.
51 Member<GarbageCollectedScriptWrappable> m_scriptWrappable; 51 Member<GarbageCollectedScriptWrappable> m_scriptWrappable;
52 }; 52 };
53 53
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 v8::Local<v8::Value> actual = toV8(value, m_scope.getScriptState()); 231 v8::Local<v8::Value> actual = toV8(value, m_scope.getScriptState());
232 EXPECT_FALSE(actual.IsEmpty()); 232 EXPECT_FALSE(actual.IsEmpty());
233 233
234 double actualAsNumber = actual.As<v8::Number>()->Value(); 234 double actualAsNumber = actual.As<v8::Number>()->Value();
235 EXPECT_EQ(1234.0, actualAsNumber); 235 EXPECT_EQ(1234.0, actualAsNumber);
236 } 236 }
237 237
238 } // namespace 238 } // namespace
239 239
240 } // namespace blink 240 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/WindowProxyManager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698