From ce5adc76847edf10dc843f5c93485e393f0ca099 Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Thu, 20 Oct 2011 10:31:42 +0200 Subject: Revert "Update V8" This reverts commit 1c4a5fcab76d1b769a4c0369d40dd0dd7c0e7495 Several of the qtdeclarative tests and examples are dying randomly with messages like this: > > # > # Fatal error in ../3rdparty/v8/src/objects-inl.h, line 2169 > # CHECK(object->IsJSFunction()) failed > # > > > ==== Stack trace ============================================ > > > ==== Details ================================================ > > ==== Key ============================================ > > ===================== > > Aborted (core dumped) Change-Id: Iebaa2497a6f6ef616ef4c3576c217d2a8a2c1ea5 Reviewed-by: Kent Hansen --- tests/auto/v8/tst_v8.cpp | 6 ------ tests/auto/v8/v8main.cpp | 3 --- tests/auto/v8/v8test.cpp | 53 ------------------------------------------------ tests/auto/v8/v8test.h | 1 - 4 files changed, 63 deletions(-) (limited to 'tests') diff --git a/tests/auto/v8/tst_v8.cpp b/tests/auto/v8/tst_v8.cpp index fcb49f84e0..c753806518 100644 --- a/tests/auto/v8/tst_v8.cpp +++ b/tests/auto/v8/tst_v8.cpp @@ -57,7 +57,6 @@ private slots: void eval(); void evalwithinwith(); void userobjectcompare(); - void externalteardown(); }; void tst_v8::eval() @@ -75,11 +74,6 @@ void tst_v8::userobjectcompare() QVERIFY(v8test_userobjectcompare()); } -void tst_v8::externalteardown() -{ - QVERIFY(v8test_externalteardown()); -} - int main(int argc, char *argv[]) { V8::SetFlagsFromCommandLine(&argc, argv, true); diff --git a/tests/auto/v8/v8main.cpp b/tests/auto/v8/v8main.cpp index 882c2b99bb..b38bbabbd5 100644 --- a/tests/auto/v8/v8main.cpp +++ b/tests/auto/v8/v8main.cpp @@ -45,8 +45,6 @@ #define RUN_TEST(testname) { \ if (!v8test_ ## testname()) \ printf ("Test %s FAILED\n", # testname); \ - else \ - printf ("Test %s PASS\n", # testname); \ } int main(int argc, char *argv[]) @@ -56,7 +54,6 @@ int main(int argc, char *argv[]) RUN_TEST(eval); RUN_TEST(evalwithinwith); RUN_TEST(userobjectcompare); - RUN_TEST(externalteardown); return -1; } diff --git a/tests/auto/v8/v8test.cpp b/tests/auto/v8/v8test.cpp index b2734af8c3..0b299ed23c 100644 --- a/tests/auto/v8/v8test.cpp +++ b/tests/auto/v8/v8test.cpp @@ -54,59 +54,6 @@ using namespace v8; } \ } -struct MyStringResource : public String::ExternalAsciiStringResource -{ - static bool wasDestroyed; - virtual ~MyStringResource() { wasDestroyed = true; } - virtual const char* data() const { return "v8test"; } - virtual size_t length() const { return 6; } -}; -bool MyStringResource::wasDestroyed = false; - -struct MyResource : public Object::ExternalResource -{ - static bool wasDestroyed; - virtual ~MyResource() { wasDestroyed = true; } -}; -bool MyResource::wasDestroyed = false; - -bool v8test_externalteardown() -{ - BEGINTEST(); - - Isolate *isolate = v8::Isolate::New(); - isolate->Enter(); - - { - HandleScope handle_scope; - Persistent context = Context::New(); - Context::Scope context_scope(context); - - Local str = String::NewExternal(new MyStringResource); - - Local ft = FunctionTemplate::New(); - ft->InstanceTemplate()->SetHasExternalResource(true); - - Local obj = ft->GetFunction()->NewInstance(); - obj->SetExternalResource(new MyResource); - - context.Dispose(); - } - - // while (!v8::V8::IdleNotification()) ; - isolate->Exit(); - isolate->Dispose(); - - // ExternalString resources aren't guaranteed to be freed by v8 at this - // point. Uncommenting the IdleNotification() line above helps. -// VERIFY(MyStringResource::wasDestroyed); - - VERIFY(MyResource::wasDestroyed); - -cleanup: - - ENDTEST(); -} bool v8test_eval() { diff --git a/tests/auto/v8/v8test.h b/tests/auto/v8/v8test.h index cb737971cb..fa9bbe9f02 100644 --- a/tests/auto/v8/v8test.h +++ b/tests/auto/v8/v8test.h @@ -51,7 +51,6 @@ bool v8test_eval(); bool v8test_evalwithinwith(); bool v8test_userobjectcompare(); -bool v8test_externalteardown(); #endif // V8TEST_H -- cgit v1.2.3