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: test/cctest/test-api.cc

Issue 109653010: Fix sporadic crash in the RequestInterruptTestWithNativeAccessor. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-api.cc
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
index 644f00d74244aa75f945178ad76af7242394542a..f494e019a08f20f15fb0878210b7ea9835e8a802 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -21048,6 +21048,10 @@ class RequestInterruptTestBase {
TestBody();
isolate_->ClearInterrupt();
+
+ // Verify we arrived here because interruptor was called
+ // not due to a bug causing us to exit the loop too early.
+ CHECK(!should_continue());
}
void WakeUpInterruptor() {
@@ -21146,11 +21150,11 @@ class RequestInterruptTestWithNativeAccessor : public RequestInterruptTestBase {
public:
virtual void TestBody() {
v8::Local<v8::FunctionTemplate> t = v8::FunctionTemplate::New(isolate_);
- v8::Local<v8::Template> proto = t->PrototypeTemplate();
- proto->SetNativeDataProperty(v8_str("shouldContinue"),
- &ShouldContinueNativeGetter,
- NULL,
- v8::External::New(isolate_, this));
+ t->InstanceTemplate()->SetNativeDataProperty(
+ v8_str("shouldContinue"),
+ &ShouldContinueNativeGetter,
+ NULL,
+ v8::External::New(isolate_, this));
env_->Global()->Set(v8_str("Klass"), t->GetFunction());
CompileRun("var obj = new Klass; while (obj.shouldContinue) { }");
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698