summaryrefslogtreecommitdiffstats
path: root/V8Binding/v8/src/factory.cc
diff options
context:
space:
mode:
Diffstat (limited to 'V8Binding/v8/src/factory.cc')
-rw-r--r--V8Binding/v8/src/factory.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/V8Binding/v8/src/factory.cc b/V8Binding/v8/src/factory.cc
index fad3e9c..bc48ebf 100644
--- a/V8Binding/v8/src/factory.cc
+++ b/V8Binding/v8/src/factory.cc
@@ -92,8 +92,6 @@ Handle<String> Factory::NewRawTwoByteString(int length,
Handle<String> Factory::NewConsString(Handle<String> first,
Handle<String> second) {
- if (first->length() == 0) return second;
- if (second->length() == 0) return first;
CALL_HEAP_FUNCTION(Heap::AllocateConsString(*first, *second), String);
}
@@ -621,6 +619,14 @@ Handle<JSObject> Factory::NewJSObject(Handle<JSFunction> constructor,
}
+Handle<JSGlobalObject> Factory::NewJSGlobalObject(
+ Handle<JSFunction> constructor) {
+ CALL_HEAP_FUNCTION(Heap::AllocateJSGlobalObject(*constructor),
+ JSGlobalObject);
+}
+
+
+
Handle<JSObject> Factory::NewJSObjectFromMap(Handle<Map> map) {
CALL_HEAP_FUNCTION(Heap::AllocateJSObjectFromMap(*map, NOT_TENURED),
JSObject);