Revision: 11952
Author: [email protected]
Date: Fri Jun 29 02:15:52 2012
Log: Fix isolate build.
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com/10704038
http://code.google.com/p/v8/source/detail?r=11952
Modified:
/branches/bleeding_edge/src/d8.cc
/branches/bleeding_edge/src/d8.h
=======================================
--- /branches/bleeding_edge/src/d8.cc Thu Jun 28 09:40:16 2012
+++ /branches/bleeding_edge/src/d8.cc Fri Jun 29 02:15:52 2012
@@ -117,7 +117,6 @@
LineEditor* Shell::console = NULL;
Persistent<Context> Shell::evaluation_context_;
-Persistent<FunctionTemplate> Shell::array_buffer_template_;
ShellOptions Shell::options;
const char* Shell::kPrompt = "d8> ";
@@ -489,7 +488,8 @@
byteLength = length * element_size;
byteOffset = 0;
- Handle<Value> array_buffer = array_buffer_template_->GetFunction();
+ Handle<Object> global = Context::GetCurrent()->Global();
+ Handle<Value> array_buffer = global->Get(String::New("ArrayBuffer"));
ASSERT(!try_catch.HasCaught() && array_buffer->IsFunction());
Handle<Value> buffer_args[] = { Uint32::New(byteLength) };
Handle<Value> result =
Handle<Function>::Cast(array_buffer)->NewInstance(
@@ -947,10 +947,8 @@
// Bind the handlers for external arrays.
PropertyAttribute attr =
static_cast<PropertyAttribute>(ReadOnly | DontDelete);
- array_buffer_template_ =
- Persistent<FunctionTemplate>::New(CreateArrayTemplate(ArrayBuffer));
global_template->Set(String::New("ArrayBuffer"),
- array_buffer_template_, attr);
+ CreateArrayTemplate(ArrayBuffer), attr);
global_template->Set(String::New("Int8Array"),
CreateArrayTemplate(Int8Array), attr);
global_template->Set(String::New("Uint8Array"),
=======================================
--- /branches/bleeding_edge/src/d8.h Thu Jun 28 09:29:53 2012
+++ /branches/bleeding_edge/src/d8.h Fri Jun 29 02:15:52 2012
@@ -367,7 +367,6 @@
private:
static Persistent<Context> evaluation_context_;
- static Persistent<FunctionTemplate> array_buffer_template_;
#ifndef V8_SHARED
static Persistent<Context> utility_context_;
static CounterMap* counter_map_;
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev