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

Side by Side Diff: src/isolate.cc

Issue 536943002: Never skip access checks when looking up properties (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « src/ic/ic.cc ('k') | src/lookup.h » ('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 <stdlib.h> 5 #include <stdlib.h>
6 6
7 #include "src/v8.h" 7 #include "src/v8.h"
8 8
9 #include "src/ast.h" 9 #include "src/ast.h"
10 #include "src/base/platform/platform.h" 10 #include "src/base/platform/platform.h"
(...skipping 1037 matching lines...) Expand 10 before | Expand all | Expand 10 after
1048 if (!bootstrapping) { 1048 if (!bootstrapping) {
1049 Handle<JSArray> stack_trace_object; 1049 Handle<JSArray> stack_trace_object;
1050 if (capture_stack_trace_for_uncaught_exceptions_) { 1050 if (capture_stack_trace_for_uncaught_exceptions_) {
1051 if (IsErrorObject(exception_handle)) { 1051 if (IsErrorObject(exception_handle)) {
1052 // We fetch the stack trace that corresponds to this error object. 1052 // We fetch the stack trace that corresponds to this error object.
1053 Handle<Name> key = factory()->detailed_stack_trace_symbol(); 1053 Handle<Name> key = factory()->detailed_stack_trace_symbol();
1054 // Look up as own property. If the lookup fails, the exception is 1054 // Look up as own property. If the lookup fails, the exception is
1055 // probably not a valid Error object. In that case, we fall through 1055 // probably not a valid Error object. In that case, we fall through
1056 // and capture the stack trace at this throw site. 1056 // and capture the stack trace at this throw site.
1057 LookupIterator lookup(exception_handle, key, 1057 LookupIterator lookup(exception_handle, key,
1058 LookupIterator::OWN_PROPERTY); 1058 LookupIterator::OWN_SKIP_INTERCEPTOR);
1059 Handle<Object> stack_trace_property; 1059 Handle<Object> stack_trace_property;
1060 if (Object::GetProperty(&lookup).ToHandle(&stack_trace_property) && 1060 if (Object::GetProperty(&lookup).ToHandle(&stack_trace_property) &&
1061 stack_trace_property->IsJSArray()) { 1061 stack_trace_property->IsJSArray()) {
1062 stack_trace_object = Handle<JSArray>::cast(stack_trace_property); 1062 stack_trace_object = Handle<JSArray>::cast(stack_trace_property);
1063 } 1063 }
1064 } 1064 }
1065 if (stack_trace_object.is_null()) { 1065 if (stack_trace_object.is_null()) {
1066 // Not an error object, we capture at throw site. 1066 // Not an error object, we capture at throw site.
1067 stack_trace_object = CaptureCurrentStackTrace( 1067 stack_trace_object = CaptureCurrentStackTrace(
1068 stack_trace_for_uncaught_exceptions_frame_limit_, 1068 stack_trace_for_uncaught_exceptions_frame_limit_,
(...skipping 1342 matching lines...) Expand 10 before | Expand all | Expand 10 after
2411 if (prev_ && prev_->Intercept(flag)) return true; 2411 if (prev_ && prev_->Intercept(flag)) return true;
2412 // Then check whether this scope intercepts. 2412 // Then check whether this scope intercepts.
2413 if ((flag & intercept_mask_)) { 2413 if ((flag & intercept_mask_)) {
2414 intercepted_flags_ |= flag; 2414 intercepted_flags_ |= flag;
2415 return true; 2415 return true;
2416 } 2416 }
2417 return false; 2417 return false;
2418 } 2418 }
2419 2419
2420 } } // namespace v8::internal 2420 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ic/ic.cc ('k') | src/lookup.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698