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

Unified Diff: test/cctest/test-debug.cc

Issue 7366: Split window support from V8. ... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 12 years, 2 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 | « test/cctest/test-api.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-debug.cc
===================================================================
--- test/cctest/test-debug.cc (revision 539)
+++ test/cctest/test-debug.cc (working copy)
@@ -41,7 +41,7 @@
using ::v8::internal::OS;
using ::v8::internal::Handle;
using ::v8::internal::Heap;
-using ::v8::internal::JSGlobalObject;
+using ::v8::internal::JSGlobalProxy;
using ::v8::internal::Code;
using ::v8::internal::Debug;
using ::v8::internal::Debugger;
@@ -137,14 +137,15 @@
void ExposeDebug() {
// Expose the debug context global object in the global object for testing.
Debug::Load();
- Handle<JSGlobalObject> global(Handle<JSGlobalObject>::cast(
+ Debug::debug_context()->set_security_token(
+ v8::Utils::OpenHandle(*context_)->security_token());
+
+ Handle<JSGlobalProxy> global(Handle<JSGlobalProxy>::cast(
v8::Utils::OpenHandle(*context_->Global())));
- Handle<JSGlobalObject> debug_global(JSGlobalObject::cast(
- Debug::debug_context()->global()));
- debug_global->set_security_token(global->security_token());
Handle<v8::internal::String> debug_string =
v8::internal::Factory::LookupAsciiSymbol("debug");
- SetProperty(global, debug_string, debug_global, DONT_ENUM);
+ SetProperty(global, debug_string,
+ Handle<Object>(Debug::debug_context()->global_proxy()), DONT_ENUM);
}
private:
v8::Persistent<v8::Context> context_;
@@ -225,8 +226,13 @@
script_data, line);
}
buffer[SMALL_STRING_BUFFER_SIZE - 1] = '\0';
- v8::Handle<v8::String> str = v8::String::New(buffer.start());
- return v8::Script::Compile(str)->Run()->Int32Value();
+ {
+ v8::TryCatch try_catch;
+ v8::Handle<v8::String> str = v8::String::New(buffer.start());
+ v8::Handle<v8::Value> value = v8::Script::Compile(str)->Run();
+ ASSERT(!try_catch.HasCaught());
+ return value->Int32Value();
+ }
}
« no previous file with comments | « test/cctest/test-api.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698