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

Side by Side Diff: src/contexts.h

Issue 201573007: Revert "Remove Failure::OutOfMemory propagation and V8::IgnoreOutOfMemoryException." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 9 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/code-stubs.h ('k') | src/elements.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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 V(FUNCTION_CACHE_INDEX, JSObject, function_cache) \ 155 V(FUNCTION_CACHE_INDEX, JSObject, function_cache) \
156 V(JSFUNCTION_RESULT_CACHES_INDEX, FixedArray, jsfunction_result_caches) \ 156 V(JSFUNCTION_RESULT_CACHES_INDEX, FixedArray, jsfunction_result_caches) \
157 V(NORMALIZED_MAP_CACHE_INDEX, NormalizedMapCache, normalized_map_cache) \ 157 V(NORMALIZED_MAP_CACHE_INDEX, NormalizedMapCache, normalized_map_cache) \
158 V(RUNTIME_CONTEXT_INDEX, Context, runtime_context) \ 158 V(RUNTIME_CONTEXT_INDEX, Context, runtime_context) \
159 V(CALL_AS_FUNCTION_DELEGATE_INDEX, JSFunction, call_as_function_delegate) \ 159 V(CALL_AS_FUNCTION_DELEGATE_INDEX, JSFunction, call_as_function_delegate) \
160 V(CALL_AS_CONSTRUCTOR_DELEGATE_INDEX, JSFunction, \ 160 V(CALL_AS_CONSTRUCTOR_DELEGATE_INDEX, JSFunction, \
161 call_as_constructor_delegate) \ 161 call_as_constructor_delegate) \
162 V(SCRIPT_FUNCTION_INDEX, JSFunction, script_function) \ 162 V(SCRIPT_FUNCTION_INDEX, JSFunction, script_function) \
163 V(OPAQUE_REFERENCE_FUNCTION_INDEX, JSFunction, opaque_reference_function) \ 163 V(OPAQUE_REFERENCE_FUNCTION_INDEX, JSFunction, opaque_reference_function) \
164 V(CONTEXT_EXTENSION_FUNCTION_INDEX, JSFunction, context_extension_function) \ 164 V(CONTEXT_EXTENSION_FUNCTION_INDEX, JSFunction, context_extension_function) \
165 V(OUT_OF_MEMORY_INDEX, Object, out_of_memory) \
165 V(MAP_CACHE_INDEX, Object, map_cache) \ 166 V(MAP_CACHE_INDEX, Object, map_cache) \
166 V(EMBEDDER_DATA_INDEX, FixedArray, embedder_data) \ 167 V(EMBEDDER_DATA_INDEX, FixedArray, embedder_data) \
167 V(ALLOW_CODE_GEN_FROM_STRINGS_INDEX, Object, allow_code_gen_from_strings) \ 168 V(ALLOW_CODE_GEN_FROM_STRINGS_INDEX, Object, allow_code_gen_from_strings) \
168 V(ERROR_MESSAGE_FOR_CODE_GEN_FROM_STRINGS_INDEX, Object, \ 169 V(ERROR_MESSAGE_FOR_CODE_GEN_FROM_STRINGS_INDEX, Object, \
169 error_message_for_code_gen_from_strings) \ 170 error_message_for_code_gen_from_strings) \
170 V(RUN_MICROTASKS_INDEX, JSFunction, run_microtasks) \ 171 V(RUN_MICROTASKS_INDEX, JSFunction, run_microtasks) \
171 V(ENQUEUE_EXTERNAL_MICROTASK_INDEX, JSFunction, enqueue_external_microtask) \ 172 V(ENQUEUE_EXTERNAL_MICROTASK_INDEX, JSFunction, enqueue_external_microtask) \
172 V(IS_PROMISE_INDEX, JSFunction, is_promise) \ 173 V(IS_PROMISE_INDEX, JSFunction, is_promise) \
173 V(PROMISE_CREATE_INDEX, JSFunction, promise_create) \ 174 V(PROMISE_CREATE_INDEX, JSFunction, promise_create) \
174 V(PROMISE_RESOLVE_INDEX, JSFunction, promise_resolve) \ 175 V(PROMISE_RESOLVE_INDEX, JSFunction, promise_resolve) \
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 } 433 }
433 bool IsModuleContext() { 434 bool IsModuleContext() {
434 Map* map = this->map(); 435 Map* map = this->map();
435 return map == map->GetHeap()->module_context_map(); 436 return map == map->GetHeap()->module_context_map();
436 } 437 }
437 bool IsGlobalContext() { 438 bool IsGlobalContext() {
438 Map* map = this->map(); 439 Map* map = this->map();
439 return map == map->GetHeap()->global_context_map(); 440 return map == map->GetHeap()->global_context_map();
440 } 441 }
441 442
443 // Tells whether the native context is marked with out of memory.
444 inline bool has_out_of_memory();
445
446 // Mark the native context with out of memory.
447 inline void mark_out_of_memory();
448
442 // A native context holds a list of all functions with optimized code. 449 // A native context holds a list of all functions with optimized code.
443 void AddOptimizedFunction(JSFunction* function); 450 void AddOptimizedFunction(JSFunction* function);
444 void RemoveOptimizedFunction(JSFunction* function); 451 void RemoveOptimizedFunction(JSFunction* function);
445 void SetOptimizedFunctionsListHead(Object* head); 452 void SetOptimizedFunctionsListHead(Object* head);
446 Object* OptimizedFunctionsListHead(); 453 Object* OptimizedFunctionsListHead();
447 454
448 // The native context also stores a list of all optimized code and a 455 // The native context also stores a list of all optimized code and a
449 // list of all deoptimized code, which are needed by the deoptimizer. 456 // list of all deoptimized code, which are needed by the deoptimizer.
450 void AddOptimizedCode(Code* code); 457 void AddOptimizedCode(Code* code);
451 void SetOptimizedCodeListHead(Object* head); 458 void SetOptimizedCodeListHead(Object* head);
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
530 static bool IsBootstrappingOrGlobalObject(Isolate* isolate, Object* object); 537 static bool IsBootstrappingOrGlobalObject(Isolate* isolate, Object* object);
531 #endif 538 #endif
532 539
533 STATIC_CHECK(kHeaderSize == Internals::kContextHeaderSize); 540 STATIC_CHECK(kHeaderSize == Internals::kContextHeaderSize);
534 STATIC_CHECK(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex); 541 STATIC_CHECK(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex);
535 }; 542 };
536 543
537 } } // namespace v8::internal 544 } } // namespace v8::internal
538 545
539 #endif // V8_CONTEXTS_H_ 546 #endif // V8_CONTEXTS_H_
OLDNEW
« no previous file with comments | « src/code-stubs.h ('k') | src/elements.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698