OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/arguments.h" | 7 #include "src/arguments.h" |
8 #include "src/debug.h" | 8 #include "src/debug.h" |
9 #include "src/runtime/runtime-utils.h" | 9 #include "src/runtime/runtime-utils.h" |
10 | 10 |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 if (isolate->has_pending_exception()) { | 81 if (isolate->has_pending_exception()) { |
82 isolate->ReportPendingMessages(); | 82 isolate->ReportPendingMessages(); |
83 isolate->clear_pending_exception(); | 83 isolate->clear_pending_exception(); |
84 isolate->set_external_caught_exception(false); | 84 isolate->set_external_caught_exception(false); |
85 } | 85 } |
86 return isolate->heap()->undefined_value(); | 86 return isolate->heap()->undefined_value(); |
87 } | 87 } |
88 | 88 |
89 | 89 |
90 RUNTIME_FUNCTION(Runtime_GetObservationState) { | 90 RUNTIME_FUNCTION(Runtime_GetObservationState) { |
91 SealHandleScope shs(isolate); | 91 HandleScope scope(isolate); |
92 DCHECK(args.length() == 0); | 92 DCHECK(args.length() == 0); |
| 93 isolate->CountUsage(v8::Isolate::kObjectObserve); |
93 return isolate->heap()->observation_state(); | 94 return isolate->heap()->observation_state(); |
94 } | 95 } |
95 | 96 |
96 | 97 |
97 static bool ContextsHaveSameOrigin(Handle<Context> context1, | 98 static bool ContextsHaveSameOrigin(Handle<Context> context1, |
98 Handle<Context> context2) { | 99 Handle<Context> context2) { |
99 return context1->security_token() == context2->security_token(); | 100 return context1->security_token() == context2->security_token(); |
100 } | 101 } |
101 | 102 |
102 | 103 |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 RUNTIME_FUNCTION(Runtime_GetObjectContextNotifierPerformChange) { | 152 RUNTIME_FUNCTION(Runtime_GetObjectContextNotifierPerformChange) { |
152 HandleScope scope(isolate); | 153 HandleScope scope(isolate); |
153 DCHECK(args.length() == 1); | 154 DCHECK(args.length() == 1); |
154 CONVERT_ARG_HANDLE_CHECKED(JSObject, object_info, 0); | 155 CONVERT_ARG_HANDLE_CHECKED(JSObject, object_info, 0); |
155 | 156 |
156 Handle<Context> context(object_info->GetCreationContext(), isolate); | 157 Handle<Context> context(object_info->GetCreationContext(), isolate); |
157 return context->native_object_notifier_perform_change(); | 158 return context->native_object_notifier_perform_change(); |
158 } | 159 } |
159 } | 160 } |
160 } // namespace v8::internal | 161 } // namespace v8::internal |
OLD | NEW |