OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 22295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
22306 CHECK_EQ("V8.Test", last_event_message); | 22306 CHECK_EQ("V8.Test", last_event_message); |
22307 CHECK_EQ(0, last_event_status); | 22307 CHECK_EQ(0, last_event_status); |
22308 histogramTimer->Stop(); | 22308 histogramTimer->Stop(); |
22309 CHECK_EQ("V8.Test", last_event_message); | 22309 CHECK_EQ("V8.Test", last_event_message); |
22310 CHECK_EQ(1, last_event_status); | 22310 CHECK_EQ(1, last_event_status); |
22311 } | 22311 } |
22312 | 22312 |
22313 | 22313 |
22314 TEST(Promises) { | 22314 TEST(Promises) { |
22315 i::FLAG_harmony_promises = true; | 22315 i::FLAG_harmony_promises = true; |
| 22316 i::FlagList::EnforceFlagImplications(); |
22316 | 22317 |
22317 LocalContext context; | 22318 LocalContext context; |
22318 v8::Isolate* isolate = context->GetIsolate(); | 22319 v8::Isolate* isolate = context->GetIsolate(); |
22319 v8::HandleScope scope(isolate); | 22320 v8::HandleScope scope(isolate); |
22320 Handle<Object> global = context->Global(); | 22321 Handle<Object> global = context->Global(); |
22321 | 22322 |
22322 // Creation. | 22323 // Creation. |
22323 Handle<v8::Promise::Resolver> pr = v8::Promise::Resolver::New(isolate); | 22324 Handle<v8::Promise::Resolver> pr = v8::Promise::Resolver::New(isolate); |
22324 Handle<v8::Promise::Resolver> rr = v8::Promise::Resolver::New(isolate); | 22325 Handle<v8::Promise::Resolver> rr = v8::Promise::Resolver::New(isolate); |
22325 Handle<v8::Promise> p = pr->GetPromise(); | 22326 Handle<v8::Promise> p = pr->GetPromise(); |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
22492 v8::internal::FLAG_stack_size = 150; | 22493 v8::internal::FLAG_stack_size = 150; |
22493 LocalContext current; | 22494 LocalContext current; |
22494 v8::Isolate* isolate = current->GetIsolate(); | 22495 v8::Isolate* isolate = current->GetIsolate(); |
22495 v8::HandleScope scope(isolate); | 22496 v8::HandleScope scope(isolate); |
22496 V8::SetCaptureStackTraceForUncaughtExceptions( | 22497 V8::SetCaptureStackTraceForUncaughtExceptions( |
22497 true, 10, v8::StackTrace::kDetailed); | 22498 true, 10, v8::StackTrace::kDetailed); |
22498 v8::TryCatch try_catch; | 22499 v8::TryCatch try_catch; |
22499 CompileRun("(function f(x) { f(x+1); })(0)"); | 22500 CompileRun("(function f(x) { f(x+1); })(0)"); |
22500 CHECK(try_catch.HasCaught()); | 22501 CHECK(try_catch.HasCaught()); |
22501 } | 22502 } |
OLD | NEW |