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

Unified Diff: Source/bindings/core/v8/V8HiddenValue.h

Issue 1278983003: Adding allocator annotations to blink classes and structs. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed patch conflict Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/bindings/core/v8/V8GlobalValueMap.h ('k') | Source/bindings/core/v8/V8IdleTaskRunner.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/core/v8/V8HiddenValue.h
diff --git a/Source/bindings/core/v8/V8HiddenValue.h b/Source/bindings/core/v8/V8HiddenValue.h
index 3943238b0ea4d794d38853952fb1410e5beaa10d..1687d2133d9920a581d84ff450df1e9fa3ee804a 100644
--- a/Source/bindings/core/v8/V8HiddenValue.h
+++ b/Source/bindings/core/v8/V8HiddenValue.h
@@ -8,6 +8,8 @@
#include "bindings/core/v8/ScopedPersistent.h"
#include "bindings/core/v8/ScriptPromiseProperties.h"
#include "core/CoreExport.h"
+#include "wtf/Allocator.h"
+#include "wtf/PassOwnPtr.h"
#include <v8.h>
namespace blink {
@@ -46,7 +48,11 @@ class ScriptWrappable;
SCRIPT_PROMISE_PROPERTIES(V, Resolver)
class CORE_EXPORT V8HiddenValue {
+ WTF_MAKE_FAST_ALLOCATED(V8HiddenValue);
+ WTF_MAKE_NONCOPYABLE(V8HiddenValue);
public:
+ static PassOwnPtr<V8HiddenValue> create() { return adoptPtr(new V8HiddenValue()); }
+
#define V8_DECLARE_METHOD(name) static v8::Local<v8::String> name(v8::Isolate* isolate);
V8_HIDDEN_VALUES(V8_DECLARE_METHOD);
#undef V8_DECLARE_METHOD
@@ -57,6 +63,8 @@ public:
static v8::Local<v8::Value> getHiddenValueFromMainWorldWrapper(v8::Isolate*, ScriptWrappable*, v8::Local<v8::String>);
private:
+ V8HiddenValue() { }
+
#define V8_DECLARE_FIELD(name) ScopedPersistent<v8::String> m_##name;
V8_HIDDEN_VALUES(V8_DECLARE_FIELD);
#undef V8_DECLARE_FIELD
« no previous file with comments | « Source/bindings/core/v8/V8GlobalValueMap.h ('k') | Source/bindings/core/v8/V8IdleTaskRunner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698