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

Side by Side Diff: src/factory.cc

Issue 1413503007: Provide a counter for thrown JavaScript errors per context (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Moved initialization Created 5 years, 1 month 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/counters.h ('k') | src/runtime/runtime-internal.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 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/factory.h" 5 #include "src/factory.h"
6 6
7 #include "src/allocation-site-scopes.h" 7 #include "src/allocation-site-scopes.h"
8 #include "src/base/bits.h" 8 #include "src/base/bits.h"
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/conversions.h" 10 #include "src/conversions.h"
(...skipping 709 matching lines...) Expand 10 before | Expand all | Expand 10 after
720 return symbol; 720 return symbol;
721 } 721 }
722 722
723 723
724 Handle<Context> Factory::NewNativeContext() { 724 Handle<Context> Factory::NewNativeContext() {
725 Handle<FixedArray> array = 725 Handle<FixedArray> array =
726 NewFixedArray(Context::NATIVE_CONTEXT_SLOTS, TENURED); 726 NewFixedArray(Context::NATIVE_CONTEXT_SLOTS, TENURED);
727 array->set_map_no_write_barrier(*native_context_map()); 727 array->set_map_no_write_barrier(*native_context_map());
728 Handle<Context> context = Handle<Context>::cast(array); 728 Handle<Context> context = Handle<Context>::cast(array);
729 context->set_js_array_maps(*undefined_value()); 729 context->set_js_array_maps(*undefined_value());
730 context->set_errors_thrown(Smi::FromInt(0));
730 DCHECK(context->IsNativeContext()); 731 DCHECK(context->IsNativeContext());
731 return context; 732 return context;
732 } 733 }
733 734
734 735
735 Handle<Context> Factory::NewScriptContext(Handle<JSFunction> function, 736 Handle<Context> Factory::NewScriptContext(Handle<JSFunction> function,
736 Handle<ScopeInfo> scope_info) { 737 Handle<ScopeInfo> scope_info) {
737 Handle<FixedArray> array = 738 Handle<FixedArray> array =
738 NewFixedArray(scope_info->ContextLength(), TENURED); 739 NewFixedArray(scope_info->ContextLength(), TENURED);
739 array->set_map_no_write_barrier(*script_context_map()); 740 array->set_map_no_write_barrier(*script_context_map());
(...skipping 1662 matching lines...) Expand 10 before | Expand all | Expand 10 after
2402 } 2403 }
2403 2404
2404 2405
2405 Handle<Object> Factory::ToBoolean(bool value) { 2406 Handle<Object> Factory::ToBoolean(bool value) {
2406 return value ? true_value() : false_value(); 2407 return value ? true_value() : false_value();
2407 } 2408 }
2408 2409
2409 2410
2410 } // namespace internal 2411 } // namespace internal
2411 } // namespace v8 2412 } // namespace v8
OLDNEW
« no previous file with comments | « src/counters.h ('k') | src/runtime/runtime-internal.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698