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

Side by Side Diff: Source/bindings/core/v8/V8Binding.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 unified diff | Download patch
« no previous file with comments | « Source/bindings/core/v8/ToV8.h ('k') | Source/bindings/core/v8/V8BindingForTesting.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 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * Copyright (C) 2012 Ericsson AB. All rights reserved. 3 * Copyright (C) 2012 Ericsson AB. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 class FlexibleArrayBufferView; 60 class FlexibleArrayBufferView;
61 class Frame; 61 class Frame;
62 class LocalDOMWindow; 62 class LocalDOMWindow;
63 class LocalFrame; 63 class LocalFrame;
64 class NodeFilter; 64 class NodeFilter;
65 class WorkerGlobalScope; 65 class WorkerGlobalScope;
66 class XPathNSResolver; 66 class XPathNSResolver;
67 67
68 template <typename T> 68 template <typename T>
69 struct V8TypeOf { 69 struct V8TypeOf {
70 STATIC_ONLY(V8TypeOf);
70 // |Type| provides C++ -> V8 type conversion for DOM wrappers. 71 // |Type| provides C++ -> V8 type conversion for DOM wrappers.
71 // The Blink binding code generator will generate specialized version of 72 // The Blink binding code generator will generate specialized version of
72 // V8TypeOf for each wrapper class. 73 // V8TypeOf for each wrapper class.
73 typedef void Type; 74 typedef void Type;
74 }; 75 };
75 76
76 namespace TraceEvent { 77 namespace TraceEvent {
77 class ConvertableToTraceFormat; 78 class ConvertableToTraceFormat;
78 } 79 }
79 80
(...skipping 940 matching lines...) Expand 10 before | Expand all | Expand 10 after
1020 1021
1021 // Result values for platform object 'deleter' methods, 1022 // Result values for platform object 'deleter' methods,
1022 // http://www.w3.org/TR/WebIDL/#delete 1023 // http://www.w3.org/TR/WebIDL/#delete
1023 enum DeleteResult { 1024 enum DeleteResult {
1024 DeleteSuccess, 1025 DeleteSuccess,
1025 DeleteReject, 1026 DeleteReject,
1026 DeleteUnknownProperty 1027 DeleteUnknownProperty
1027 }; 1028 };
1028 1029
1029 class V8IsolateInterruptor : public ThreadState::Interruptor { 1030 class V8IsolateInterruptor : public ThreadState::Interruptor {
1031 WTF_MAKE_FAST_ALLOCATED(V8IsolateInterruptor);
1030 public: 1032 public:
1031 explicit V8IsolateInterruptor(v8::Isolate* isolate) 1033 explicit V8IsolateInterruptor(v8::Isolate* isolate)
1032 : m_isolate(isolate) 1034 : m_isolate(isolate)
1033 { 1035 {
1034 } 1036 }
1035 1037
1036 static void onInterruptCallback(v8::Isolate* isolate, void* data) 1038 static void onInterruptCallback(v8::Isolate* isolate, void* data)
1037 { 1039 {
1038 V8IsolateInterruptor* interruptor = reinterpret_cast<V8IsolateInterrupto r*>(data); 1040 V8IsolateInterruptor* interruptor = reinterpret_cast<V8IsolateInterrupto r*>(data);
1039 interruptor->onInterrupted(); 1041 interruptor->onInterrupted();
1040 } 1042 }
1041 1043
1042 void requestInterrupt() override 1044 void requestInterrupt() override
1043 { 1045 {
1044 m_isolate->RequestInterrupt(&onInterruptCallback, this); 1046 m_isolate->RequestInterrupt(&onInterruptCallback, this);
1045 } 1047 }
1046 1048
1047 private: 1049 private:
1048 v8::Isolate* m_isolate; 1050 v8::Isolate* m_isolate;
1049 }; 1051 };
1050 1052
1051 class DevToolsFunctionInfo final { 1053 class DevToolsFunctionInfo final {
1054 STACK_ALLOCATED();
1052 public: 1055 public:
1053 explicit DevToolsFunctionInfo(v8::Local<v8::Function>& function) 1056 explicit DevToolsFunctionInfo(v8::Local<v8::Function>& function)
1054 : m_scriptId(0) 1057 : m_scriptId(0)
1055 , m_lineNumber(1) 1058 , m_lineNumber(1)
1056 , m_function(function) 1059 , m_function(function)
1057 { 1060 {
1058 ASSERT(!m_function.IsEmpty()); 1061 ASSERT(!m_function.IsEmpty());
1059 } 1062 }
1060 1063
1061 DevToolsFunctionInfo(int scriptId, const String& resourceName, int lineNumbe r) 1064 DevToolsFunctionInfo(int scriptId, const String& resourceName, int lineNumbe r)
(...skipping 19 matching lines...) Expand all
1081 PassRefPtr<TraceEvent::ConvertableToTraceFormat> devToolsTraceEventData(v8::Isol ate*, ExecutionContext*, v8::Local<v8::Function>); 1084 PassRefPtr<TraceEvent::ConvertableToTraceFormat> devToolsTraceEventData(v8::Isol ate*, ExecutionContext*, v8::Local<v8::Function>);
1082 1085
1083 // Callback functions used by generated code. 1086 // Callback functions used by generated code.
1084 CORE_EXPORT void v8ConstructorAttributeGetter(v8::Local<v8::Name> propertyName, const v8::PropertyCallbackInfo<v8::Value>&); 1087 CORE_EXPORT void v8ConstructorAttributeGetter(v8::Local<v8::Name> propertyName, const v8::PropertyCallbackInfo<v8::Value>&);
1085 1088
1086 typedef void (*InstallTemplateFunction)(v8::Local<v8::FunctionTemplate>, v8::Iso late*); 1089 typedef void (*InstallTemplateFunction)(v8::Local<v8::FunctionTemplate>, v8::Iso late*);
1087 1090
1088 } // namespace blink 1091 } // namespace blink
1089 1092
1090 #endif // V8Binding_h 1093 #endif // V8Binding_h
OLDNEW
« no previous file with comments | « Source/bindings/core/v8/ToV8.h ('k') | Source/bindings/core/v8/V8BindingForTesting.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698