| Index: src/runtime/runtime-observe.cc
|
| diff --git a/src/runtime/runtime-observe.cc b/src/runtime/runtime-observe.cc
|
| index ab7f2503b18655dcc2958248330e17aad10eae61..4579136d9aa8efd1ad5b3f47d5d6e6189d8df674 100644
|
| --- a/src/runtime/runtime-observe.cc
|
| +++ b/src/runtime/runtime-observe.cc
|
| @@ -52,6 +52,28 @@ RUNTIME_FUNCTION(Runtime_RunMicrotasks) {
|
| }
|
|
|
|
|
| +RUNTIME_FUNCTION(Runtime_DeliverObservationChangeRecords) {
|
| + HandleScope scope(isolate);
|
| + DCHECK(args.length() == 2);
|
| + CONVERT_ARG_HANDLE_CHECKED(JSFunction, callback, 0);
|
| + CONVERT_ARG_HANDLE_CHECKED(Object, argument, 1);
|
| + v8::TryCatch catcher;
|
| + // We should send a message on uncaught exception thrown during
|
| + // Object.observe delivery while not interrupting further delivery, thus
|
| + // we make a call inside a verbose TryCatch.
|
| + catcher.SetVerbose(true);
|
| + Handle<Object> argv[] = {argument};
|
| + USE(Execution::Call(isolate, callback, isolate->factory()->undefined_value(),
|
| + arraysize(argv), argv));
|
| + if (isolate->has_pending_exception()) {
|
| + isolate->ReportPendingMessages();
|
| + isolate->clear_pending_exception();
|
| + isolate->set_external_caught_exception(false);
|
| + }
|
| + return isolate->heap()->undefined_value();
|
| +}
|
| +
|
| +
|
| RUNTIME_FUNCTION(Runtime_GetObservationState) {
|
| SealHandleScope shs(isolate);
|
| DCHECK(args.length() == 0);
|
|
|