Title: [125480] trunk/Source/WebCore
- Revision
- 125480
- Author
- [email protected]
- Date
- 2012-08-13 17:47:05 -0700 (Mon, 13 Aug 2012)
Log Message
[V8] Move the ConstructorMode class from V8Binding.h to SafeAllocation.h
https://bugs.webkit.org/show_bug.cgi?id=93821
Reviewed by Adam Barth.
This patch factors out the ConstructorMode class from V8Binding.h to SafeAllocation.h.
No tests. No change in behavior.
* bindings/v8/SafeAllocation.h:
(ConstructorMode):
(WebCore::ConstructorMode::ConstructorMode):
(WebCore::ConstructorMode::~ConstructorMode):
(WebCore::ConstructorMode::current):
(WebCore):
* bindings/v8/V8Binding.h:
* bindings/v8/V8RecursionScope.h:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (125479 => 125480)
--- trunk/Source/WebCore/ChangeLog 2012-08-14 00:44:32 UTC (rev 125479)
+++ trunk/Source/WebCore/ChangeLog 2012-08-14 00:47:05 UTC (rev 125480)
@@ -1,5 +1,25 @@
2012-08-13 Kentaro Hara <[email protected]>
+ [V8] Move the ConstructorMode class from V8Binding.h to SafeAllocation.h
+ https://bugs.webkit.org/show_bug.cgi?id=93821
+
+ Reviewed by Adam Barth.
+
+ This patch factors out the ConstructorMode class from V8Binding.h to SafeAllocation.h.
+
+ No tests. No change in behavior.
+
+ * bindings/v8/SafeAllocation.h:
+ (ConstructorMode):
+ (WebCore::ConstructorMode::ConstructorMode):
+ (WebCore::ConstructorMode::~ConstructorMode):
+ (WebCore::ConstructorMode::current):
+ (WebCore):
+ * bindings/v8/V8Binding.h:
+ * bindings/v8/V8RecursionScope.h:
+
+2012-08-13 Kentaro Hara <[email protected]>
+
[V8] Remove V8BindingHelpers
https://bugs.webkit.org/show_bug.cgi?id=93807
Modified: trunk/Source/WebCore/bindings/v8/SafeAllocation.h (125479 => 125480)
--- trunk/Source/WebCore/bindings/v8/SafeAllocation.h 2012-08-14 00:44:32 UTC (rev 125479)
+++ trunk/Source/WebCore/bindings/v8/SafeAllocation.h 2012-08-14 00:47:05 UTC (rev 125480)
@@ -31,13 +31,39 @@
#ifndef SafeAllocation_h
#define SafeAllocation_h
-#include "V8Binding.h"
+#include "V8PerIsolateData.h"
#include "V8RecursionScope.h"
#include <v8.h>
namespace WebCore {
+class ConstructorMode {
+public:
+ enum Mode {
+ WrapExistingObject,
+ CreateNewObject
+ };
+
+ ConstructorMode()
+ {
+ V8PerIsolateData* data = ""
+ m_previous = data->m_constructorMode;
+ data->m_constructorMode = WrapExistingObject;
+ }
+
+ ~ConstructorMode()
+ {
+ V8PerIsolateData* data = ""
+ data->m_constructorMode = m_previous;
+ }
+
+ static bool current() { return V8PerIsolateData::current()->m_constructorMode; }
+
+private:
+ bool m_previous;
+};
+
class SafeAllocation {
public:
static inline v8::Local<v8::Object> newInstance(v8::Handle<v8::Function>);
Modified: trunk/Source/WebCore/bindings/v8/V8Binding.h (125479 => 125480)
--- trunk/Source/WebCore/bindings/v8/V8Binding.h 2012-08-14 00:44:32 UTC (rev 125479)
+++ trunk/Source/WebCore/bindings/v8/V8Binding.h 2012-08-14 00:47:05 UTC (rev 125480)
@@ -32,18 +32,15 @@
#define V8Binding_h
#include "BindingSecurity.h"
-#include "DOMDataStore.h"
#include "Document.h"
-#include "PlatformString.h"
+#include "SafeAllocation.h"
#include "V8BindingMacros.h"
#include "V8DOMConfiguration.h"
#include "V8DOMWrapper.h"
-#include "V8GCController.h"
#include "V8HiddenPropertyName.h"
#include "V8PerIsolateData.h"
#include "V8Proxy.h"
#include "V8ValueCache.h"
-#include <wtf/MathExtras.h>
#include <wtf/Noncopyable.h>
#include <wtf/text/AtomicString.h>
#include <v8.h>
@@ -77,32 +74,6 @@
GCEventListeners m_listeners;
};
- class ConstructorMode {
- public:
- enum Mode {
- WrapExistingObject,
- CreateNewObject
- };
-
- ConstructorMode()
- {
- V8PerIsolateData* data = ""
- m_previous = data->m_constructorMode;
- data->m_constructorMode = WrapExistingObject;
- }
-
- ~ConstructorMode()
- {
- V8PerIsolateData* data = ""
- data->m_constructorMode = m_previous;
- }
-
- static bool current() { return V8PerIsolateData::current()->m_constructorMode; }
-
- private:
- bool m_previous;
- };
-
// Since v8::Null(isolate) crashes if we pass a null isolate,
// we need to use v8NullWithCheck(isolate) if an isolate can be null.
//
Modified: trunk/Source/WebCore/bindings/v8/V8RecursionScope.h (125479 => 125480)
--- trunk/Source/WebCore/bindings/v8/V8RecursionScope.h 2012-08-14 00:44:32 UTC (rev 125479)
+++ trunk/Source/WebCore/bindings/v8/V8RecursionScope.h 2012-08-14 00:47:05 UTC (rev 125480)
@@ -32,7 +32,7 @@
#define V8RecursionScope_h
#include "ScriptExecutionContext.h"
-#include "V8Binding.h"
+#include "V8PerIsolateData.h"
#include <wtf/Noncopyable.h>
namespace WebCore {
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes