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

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/ScopedPersistent.h

Issue 2819613002: Remove last remaining references to v8::Handle (all in comments/docs) in Blink. (Closed)
Patch Set: Created 3 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
« no previous file with comments | « third_party/WebKit/Source/bindings/IDLExtendedAttributes.md ('k') | no next file » | 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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 78
79 void ClearWeak() { handle_.template ClearWeak<void>(); } 79 void ClearWeak() { handle_.template ClearWeak<void>(); }
80 80
81 bool IsEmpty() const { return handle_.IsEmpty(); } 81 bool IsEmpty() const { return handle_.IsEmpty(); }
82 bool IsWeak() const { return handle_.IsWeak(); } 82 bool IsWeak() const { return handle_.IsWeak(); }
83 83
84 virtual void Set(v8::Isolate* isolate, v8::Local<T> handle) { 84 virtual void Set(v8::Isolate* isolate, v8::Local<T> handle) {
85 handle_.Reset(isolate, handle); 85 handle_.Reset(isolate, handle);
86 } 86 }
87 87
88 // Note: This is clear in the std::unique_ptr sense, not the v8::Handle sense. 88 // Note: This is clear in the std::unique_ptr sense, not the v8::Local sense.
89 void Clear() { handle_.Reset(); } 89 void Clear() { handle_.Reset(); }
90 90
91 bool operator==(const ScopedPersistent<T>& other) { 91 bool operator==(const ScopedPersistent<T>& other) {
92 return handle_ == other.handle_; 92 return handle_ == other.handle_;
93 } 93 }
94 94
95 template <class S> 95 template <class S>
96 bool operator==(const v8::Local<S> other) const { 96 bool operator==(const v8::Local<S> other) const {
97 return handle_ == other; 97 return handle_ == other;
98 } 98 }
99 99
100 ALWAYS_INLINE v8::Persistent<T>& Get() { return handle_; } 100 ALWAYS_INLINE v8::Persistent<T>& Get() { return handle_; }
101 101
102 private: 102 private:
103 v8::Persistent<T> handle_; 103 v8::Persistent<T> handle_;
104 }; 104 };
105 105
106 } // namespace blink 106 } // namespace blink
107 107
108 #endif // ScopedPersistent_h 108 #endif // ScopedPersistent_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/bindings/IDLExtendedAttributes.md ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698