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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/ArrayValue.h

Issue 2272313003: binding: Makes ExceptionState STACK_ALLOCATED(). (Closed)
Patch Set: Synced. Created 4 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 | « no previous file | third_party/WebKit/Source/bindings/core/v8/ArrayValue.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/bindings/core/v8/ArrayValue.h
diff --git a/third_party/WebKit/Source/bindings/core/v8/ArrayValue.h b/third_party/WebKit/Source/bindings/core/v8/ArrayValue.h
index 9020d4dcc23c5cd8bd9d7ced2101d366822ccb77..214f23f0b02fde7e172c2a12b7b3234832c4a8ed 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ArrayValue.h
+++ b/third_party/WebKit/Source/bindings/core/v8/ArrayValue.h
@@ -26,8 +26,8 @@
#ifndef ArrayValue_h
#define ArrayValue_h
-#include "bindings/core/v8/ExceptionState.h"
#include "core/CoreExport.h"
+#include "wtf/Allocator.h"
#include "wtf/Assertions.h"
#include <v8.h>
@@ -35,16 +35,16 @@ namespace blink {
class Dictionary;
-class CORE_EXPORT ArrayValue {
+class CORE_EXPORT ArrayValue final {
+ STACK_ALLOCATED();
public:
- ArrayValue() : m_isolate(0) { }
- explicit ArrayValue(const v8::Local<v8::Array>& array, v8::Isolate* isolate)
+ ArrayValue() : m_isolate(nullptr) { }
+ ArrayValue(const v8::Local<v8::Array>& array, v8::Isolate* isolate)
: m_array(array)
, m_isolate(isolate)
{
- ASSERT(m_isolate);
+ DCHECK(m_isolate);
}
- ~ArrayValue() { }
ArrayValue& operator=(const ArrayValue&);
@@ -54,15 +54,8 @@ public:
bool get(size_t index, Dictionary&) const;
private:
- // This object can only be used safely when stack allocated because of v8::Local.
- static void* operator new(size_t);
- static void* operator new[](size_t);
- static void operator delete(void *);
-
v8::Local<v8::Array> m_array;
v8::Isolate* m_isolate;
- // FIXME: ArrayValue constructor should take an exception state.
- mutable NonThrowableExceptionState m_exceptionState;
};
} // namespace blink
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/ArrayValue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698