| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <stdlib.h> | 5 #include <stdlib.h> |
| 6 | 6 |
| 7 #include <fstream> // NOLINT(readability/streams) | 7 #include <fstream> // NOLINT(readability/streams) |
| 8 #include <sstream> | 8 #include <sstream> |
| 9 | 9 |
| 10 #include "src/v8.h" | 10 #include "src/v8.h" |
| (...skipping 1372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1383 return false; | 1383 return false; |
| 1384 } | 1384 } |
| 1385 | 1385 |
| 1386 // Reschedule the exception. | 1386 // Reschedule the exception. |
| 1387 thread_local_top()->scheduled_exception_ = pending_exception(); | 1387 thread_local_top()->scheduled_exception_ = pending_exception(); |
| 1388 clear_pending_exception(); | 1388 clear_pending_exception(); |
| 1389 return true; | 1389 return true; |
| 1390 } | 1390 } |
| 1391 | 1391 |
| 1392 | 1392 |
| 1393 void Isolate::PushPromise(Handle<JSObject> promise) { | 1393 void Isolate::PushPromise(Handle<Object> promise) { |
| 1394 ThreadLocalTop* tltop = thread_local_top(); | 1394 ThreadLocalTop* tltop = thread_local_top(); |
| 1395 PromiseOnStack* prev = tltop->promise_on_stack_; | 1395 PromiseOnStack* prev = tltop->promise_on_stack_; |
| 1396 StackHandler* handler = StackHandler::FromAddress(Isolate::handler(tltop)); | 1396 StackHandler* handler = StackHandler::FromAddress(Isolate::handler(tltop)); |
| 1397 Handle<JSObject> global_handle = | 1397 Handle<Object> global_handle = global_handles()->Create(*promise); |
| 1398 Handle<JSObject>::cast(global_handles()->Create(*promise)); | |
| 1399 tltop->promise_on_stack_ = new PromiseOnStack(handler, global_handle, prev); | 1398 tltop->promise_on_stack_ = new PromiseOnStack(handler, global_handle, prev); |
| 1400 } | 1399 } |
| 1401 | 1400 |
| 1402 | 1401 |
| 1403 void Isolate::PopPromise() { | 1402 void Isolate::PopPromise() { |
| 1404 ThreadLocalTop* tltop = thread_local_top(); | 1403 ThreadLocalTop* tltop = thread_local_top(); |
| 1405 if (tltop->promise_on_stack_ == NULL) return; | 1404 if (tltop->promise_on_stack_ == NULL) return; |
| 1406 PromiseOnStack* prev = tltop->promise_on_stack_->prev(); | 1405 PromiseOnStack* prev = tltop->promise_on_stack_->prev(); |
| 1407 Handle<Object> global_handle = tltop->promise_on_stack_->promise(); | 1406 Handle<Object> global_handle = tltop->promise_on_stack_->promise(); |
| 1408 delete tltop->promise_on_stack_; | 1407 delete tltop->promise_on_stack_; |
| (...skipping 1087 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2496 if (prev_ && prev_->Intercept(flag)) return true; | 2495 if (prev_ && prev_->Intercept(flag)) return true; |
| 2497 // Then check whether this scope intercepts. | 2496 // Then check whether this scope intercepts. |
| 2498 if ((flag & intercept_mask_)) { | 2497 if ((flag & intercept_mask_)) { |
| 2499 intercepted_flags_ |= flag; | 2498 intercepted_flags_ |= flag; |
| 2500 return true; | 2499 return true; |
| 2501 } | 2500 } |
| 2502 return false; | 2501 return false; |
| 2503 } | 2502 } |
| 2504 | 2503 |
| 2505 } } // namespace v8::internal | 2504 } } // namespace v8::internal |
| OLD | NEW |