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

Side by Side Diff: src/contexts.h

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/bootstrapper.cc ('k') | src/contexts.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 #ifndef V8_CONTEXTS_H_ 5 #ifndef V8_CONTEXTS_H_
6 #define V8_CONTEXTS_H_ 6 #define V8_CONTEXTS_H_
7 7
8 #include "src/heap/heap.h" 8 #include "src/heap/heap.h"
9 #include "src/objects.h" 9 #include "src/objects.h"
10 10
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 bound_function_with_constructor_map) \ 179 bound_function_with_constructor_map) \
180 V(BOUND_FUNCTION_WITHOUT_CONSTRUCTOR_MAP_INDEX, Map, \ 180 V(BOUND_FUNCTION_WITHOUT_CONSTRUCTOR_MAP_INDEX, Map, \
181 bound_function_without_constructor_map) \ 181 bound_function_without_constructor_map) \
182 V(CALL_AS_CONSTRUCTOR_DELEGATE_INDEX, JSFunction, \ 182 V(CALL_AS_CONSTRUCTOR_DELEGATE_INDEX, JSFunction, \
183 call_as_constructor_delegate) \ 183 call_as_constructor_delegate) \
184 V(CALL_AS_FUNCTION_DELEGATE_INDEX, JSFunction, call_as_function_delegate) \ 184 V(CALL_AS_FUNCTION_DELEGATE_INDEX, JSFunction, call_as_function_delegate) \
185 V(CONTEXT_EXTENSION_FUNCTION_INDEX, JSFunction, context_extension_function) \ 185 V(CONTEXT_EXTENSION_FUNCTION_INDEX, JSFunction, context_extension_function) \
186 V(DATA_VIEW_FUN_INDEX, JSFunction, data_view_fun) \ 186 V(DATA_VIEW_FUN_INDEX, JSFunction, data_view_fun) \
187 V(ERROR_MESSAGE_FOR_CODE_GEN_FROM_STRINGS_INDEX, Object, \ 187 V(ERROR_MESSAGE_FOR_CODE_GEN_FROM_STRINGS_INDEX, Object, \
188 error_message_for_code_gen_from_strings) \ 188 error_message_for_code_gen_from_strings) \
189 V(ERRORS_THROWN_INDEX, Smi, errors_thrown) \
189 V(EXTRAS_EXPORTS_OBJECT_INDEX, JSObject, extras_binding_object) \ 190 V(EXTRAS_EXPORTS_OBJECT_INDEX, JSObject, extras_binding_object) \
190 V(EXTRAS_UTILS_OBJECT_INDEX, JSObject, extras_utils_object) \ 191 V(EXTRAS_UTILS_OBJECT_INDEX, JSObject, extras_utils_object) \
191 V(FAST_ALIASED_ARGUMENTS_MAP_INDEX, Map, fast_aliased_arguments_map) \ 192 V(FAST_ALIASED_ARGUMENTS_MAP_INDEX, Map, fast_aliased_arguments_map) \
192 V(FLOAT32_ARRAY_FUN_INDEX, JSFunction, float32_array_fun) \ 193 V(FLOAT32_ARRAY_FUN_INDEX, JSFunction, float32_array_fun) \
193 V(FLOAT32X4_FUNCTION_INDEX, JSFunction, float32x4_function) \ 194 V(FLOAT32X4_FUNCTION_INDEX, JSFunction, float32x4_function) \
194 V(FLOAT64_ARRAY_FUN_INDEX, JSFunction, float64_array_fun) \ 195 V(FLOAT64_ARRAY_FUN_INDEX, JSFunction, float64_array_fun) \
195 V(FUNCTION_CACHE_INDEX, ObjectHashTable, function_cache) \ 196 V(FUNCTION_CACHE_INDEX, ObjectHashTable, function_cache) \
196 V(GENERATOR_OBJECT_PROTOTYPE_MAP_INDEX, Map, generator_object_prototype_map) \ 197 V(GENERATOR_OBJECT_PROTOTYPE_MAP_INDEX, Map, generator_object_prototype_map) \
197 V(INITIAL_ARRAY_PROTOTYPE_INDEX, JSObject, initial_array_prototype) \ 198 V(INITIAL_ARRAY_PROTOTYPE_INDEX, JSObject, initial_array_prototype) \
198 V(INITIAL_OBJECT_PROTOTYPE_INDEX, JSObject, initial_object_prototype) \ 199 V(INITIAL_OBJECT_PROTOTYPE_INDEX, JSObject, initial_object_prototype) \
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 390
390 // Total number of slots. 391 // Total number of slots.
391 NATIVE_CONTEXT_SLOTS, 392 NATIVE_CONTEXT_SLOTS,
392 FIRST_WEAK_SLOT = OPTIMIZED_FUNCTIONS_LIST, 393 FIRST_WEAK_SLOT = OPTIMIZED_FUNCTIONS_LIST,
393 394
394 MIN_CONTEXT_SLOTS = GLOBAL_PROXY_INDEX, 395 MIN_CONTEXT_SLOTS = GLOBAL_PROXY_INDEX,
395 // This slot holds the thrown value in catch contexts. 396 // This slot holds the thrown value in catch contexts.
396 THROWN_OBJECT_INDEX = MIN_CONTEXT_SLOTS, 397 THROWN_OBJECT_INDEX = MIN_CONTEXT_SLOTS,
397 }; 398 };
398 399
400 void IncrementErrorsThrown();
401 int GetErrorsThrown();
402
399 // Direct slot access. 403 // Direct slot access.
400 inline JSFunction* closure(); 404 inline JSFunction* closure();
401 inline void set_closure(JSFunction* closure); 405 inline void set_closure(JSFunction* closure);
402 406
403 inline Context* previous(); 407 inline Context* previous();
404 inline void set_previous(Context* context); 408 inline void set_previous(Context* context);
405 409
406 inline bool has_extension(); 410 inline bool has_extension();
407 inline Object* extension(); 411 inline Object* extension();
408 inline void set_extension(Object* object); 412 inline void set_extension(Object* object);
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 #endif 554 #endif
551 555
552 STATIC_ASSERT(kHeaderSize == Internals::kContextHeaderSize); 556 STATIC_ASSERT(kHeaderSize == Internals::kContextHeaderSize);
553 STATIC_ASSERT(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex); 557 STATIC_ASSERT(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex);
554 }; 558 };
555 559
556 } // namespace internal 560 } // namespace internal
557 } // namespace v8 561 } // namespace v8
558 562
559 #endif // V8_CONTEXTS_H_ 563 #endif // V8_CONTEXTS_H_
OLDNEW
« no previous file with comments | « src/bootstrapper.cc ('k') | src/contexts.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698