Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: src/isolate.cc

Issue 2151843002: Revert of Reland "Don't compile functions in a context the caller doesn't have access to" (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/flag-definitions.h ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "src/isolate.h" 5 #include "src/isolate.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 8
9 #include <fstream> // NOLINT(readability/streams) 9 #include <fstream> // NOLINT(readability/streams)
10 #include <sstream> 10 #include <sstream>
(...skipping 2869 matching lines...) Expand 10 before | Expand all | Expand 10 after
2880 heap()->set_microtask_queue(heap()->empty_fixed_array()); 2880 heap()->set_microtask_queue(heap()->empty_fixed_array());
2881 2881
2882 Isolate* isolate = this; 2882 Isolate* isolate = this;
2883 FOR_WITH_HANDLE_SCOPE(isolate, int, i = 0, i, i < num_tasks, i++, { 2883 FOR_WITH_HANDLE_SCOPE(isolate, int, i = 0, i, i < num_tasks, i++, {
2884 Handle<Object> microtask(queue->get(i), this); 2884 Handle<Object> microtask(queue->get(i), this);
2885 if (microtask->IsJSFunction()) { 2885 if (microtask->IsJSFunction()) {
2886 Handle<JSFunction> microtask_function = 2886 Handle<JSFunction> microtask_function =
2887 Handle<JSFunction>::cast(microtask); 2887 Handle<JSFunction>::cast(microtask);
2888 SaveContext save(this); 2888 SaveContext save(this);
2889 set_context(microtask_function->context()->native_context()); 2889 set_context(microtask_function->context()->native_context());
2890 handle_scope_implementer_->EnterContext(
2891 handle(microtask_function->context(), this));
2892 MaybeHandle<Object> maybe_exception; 2890 MaybeHandle<Object> maybe_exception;
2893 MaybeHandle<Object> result = Execution::TryCall( 2891 MaybeHandle<Object> result = Execution::TryCall(
2894 this, microtask_function, factory()->undefined_value(), 0, NULL, 2892 this, microtask_function, factory()->undefined_value(), 0, NULL,
2895 &maybe_exception); 2893 &maybe_exception);
2896 handle_scope_implementer_->LeaveContext();
2897 // If execution is terminating, just bail out. 2894 // If execution is terminating, just bail out.
2898 Handle<Object> exception; 2895 Handle<Object> exception;
2899 if (result.is_null() && maybe_exception.is_null()) { 2896 if (result.is_null() && maybe_exception.is_null()) {
2900 // Clear out any remaining callbacks in the queue. 2897 // Clear out any remaining callbacks in the queue.
2901 heap()->set_microtask_queue(heap()->empty_fixed_array()); 2898 heap()->set_microtask_queue(heap()->empty_fixed_array());
2902 set_pending_microtask_count(0); 2899 set_pending_microtask_count(0);
2903 return; 2900 return;
2904 } 2901 }
2905 } else { 2902 } else {
2906 Handle<CallHandlerInfo> callback_info = 2903 Handle<CallHandlerInfo> callback_info =
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
3088 // Then check whether this scope intercepts. 3085 // Then check whether this scope intercepts.
3089 if ((flag & intercept_mask_)) { 3086 if ((flag & intercept_mask_)) {
3090 intercepted_flags_ |= flag; 3087 intercepted_flags_ |= flag;
3091 return true; 3088 return true;
3092 } 3089 }
3093 return false; 3090 return false;
3094 } 3091 }
3095 3092
3096 } // namespace internal 3093 } // namespace internal
3097 } // namespace v8 3094 } // namespace v8
OLDNEW
« no previous file with comments | « src/flag-definitions.h ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698