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

Unified Diff: src/d8.cc

Issue 6685088: Merge isolates to bleeding_edge. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 9 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 | « src/cpu-profiler.cc ('k') | src/d8-debug.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/d8.cc
===================================================================
--- src/d8.cc (revision 7267)
+++ src/d8.cc (working copy)
@@ -29,6 +29,8 @@
#include <stdlib.h>
#include <errno.h>
+#include "v8.h"
+
#include "d8.h"
#include "d8-debug.h"
#include "debug.h"
@@ -441,24 +443,25 @@
i::JSArguments js_args = i::FLAG_js_arguments;
i::Handle<i::FixedArray> arguments_array =
- i::Factory::NewFixedArray(js_args.argc());
+ FACTORY->NewFixedArray(js_args.argc());
for (int j = 0; j < js_args.argc(); j++) {
i::Handle<i::String> arg =
- i::Factory::NewStringFromUtf8(i::CStrVector(js_args[j]));
+ FACTORY->NewStringFromUtf8(i::CStrVector(js_args[j]));
arguments_array->set(j, *arg);
}
i::Handle<i::JSArray> arguments_jsarray =
- i::Factory::NewJSArrayWithElements(arguments_array);
+ FACTORY->NewJSArrayWithElements(arguments_array);
global_template->Set(String::New("arguments"),
Utils::ToLocal(arguments_jsarray));
#ifdef ENABLE_DEBUGGER_SUPPORT
// Install the debugger object in the utility scope
- i::Debug::Load();
- i::Handle<i::JSObject> debug
- = i::Handle<i::JSObject>(i::Debug::debug_context()->global());
+ i::Debug* debug = i::Isolate::Current()->debug();
+ debug->Load();
+ i::Handle<i::JSObject> js_debug
+ = i::Handle<i::JSObject>(debug->debug_context()->global());
utility_context_->Global()->Set(String::New("$debug"),
- Utils::ToLocal(debug));
+ Utils::ToLocal(js_debug));
#endif
// Run the d8 shell utility script in the utility context
@@ -490,7 +493,7 @@
#ifdef ENABLE_DEBUGGER_SUPPORT
// Set the security token of the debug context to allow access.
- i::Debug::debug_context()->set_security_token(i::Heap::undefined_value());
+ debug->debug_context()->set_security_token(HEAP->undefined_value());
// Start the debugger agent if requested.
if (i::FLAG_debugger_agent) {
@@ -606,8 +609,8 @@
class ShellThread : public i::Thread {
public:
- ShellThread(int no, i::Vector<const char> files)
- : Thread("d8:ShellThread"),
+ ShellThread(i::Isolate* isolate, int no, i::Vector<const char> files)
+ : Thread(isolate, "d8:ShellThread"),
no_(no), files_(files) { }
virtual void Run();
private:
@@ -739,7 +742,8 @@
const char* files = ReadChars(argv[++i], &size);
if (files == NULL) return 1;
ShellThread* thread =
- new ShellThread(threads.length(),
+ new ShellThread(i::Isolate::Current(),
+ threads.length(),
i::Vector<const char>(files, size));
thread->Start();
threads.Add(thread);
« no previous file with comments | « src/cpu-profiler.cc ('k') | src/d8-debug.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698