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

Side by Side Diff: include/v8.h

Issue 209903003: Reland "Remove Failure::OutOfMemory propagation and V8::IgnoreOutOfMemoryException." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: fix 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 | « no previous file | src/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 // 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 4598 matching lines...) Expand 10 before | Expand all | Expand 10 after
4609 4609
4610 /** 4610 /**
4611 * Set allocator to use for ArrayBuffer memory. 4611 * Set allocator to use for ArrayBuffer memory.
4612 * The allocator should be set only once. The allocator should be set 4612 * The allocator should be set only once. The allocator should be set
4613 * before any code tha uses ArrayBuffers is executed. 4613 * before any code tha uses ArrayBuffers is executed.
4614 * This allocator is used in all isolates. 4614 * This allocator is used in all isolates.
4615 */ 4615 */
4616 static void SetArrayBufferAllocator(ArrayBuffer::Allocator* allocator); 4616 static void SetArrayBufferAllocator(ArrayBuffer::Allocator* allocator);
4617 4617
4618 /** 4618 /**
4619 * Ignore out-of-memory exceptions.
4620 *
4621 * V8 running out of memory is treated as a fatal error by default.
4622 * This means that the fatal error handler is called and that V8 is
4623 * terminated.
4624 *
4625 * IgnoreOutOfMemoryException can be used to not treat an
4626 * out-of-memory situation as a fatal error. This way, the contexts
4627 * that did not cause the out of memory problem might be able to
4628 * continue execution.
4629 */
4630 static void IgnoreOutOfMemoryException();
4631
4632 /**
4633 * Check if V8 is dead and therefore unusable. This is the case after 4619 * Check if V8 is dead and therefore unusable. This is the case after
4634 * fatal errors such as out-of-memory situations. 4620 * fatal errors such as out-of-memory situations.
4635 */ 4621 */
4636 static bool IsDead(); 4622 static bool IsDead();
4637 4623
4638 /** 4624 /**
4639 * The following 4 functions are to be used when V8 is built with 4625 * The following 4 functions are to be used when V8 is built with
4640 * the 'compress_startup_data' flag enabled. In this case, the 4626 * the 'compress_startup_data' flag enabled. In this case, the
4641 * embedder must decompress startup data prior to initializing V8. 4627 * embedder must decompress startup data prior to initializing V8.
4642 * 4628 *
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after
5227 */ 5213 */
5228 void Enter(); 5214 void Enter();
5229 5215
5230 /** 5216 /**
5231 * Exit this context. Exiting the current context restores the 5217 * Exit this context. Exiting the current context restores the
5232 * context that was in place when entering the current context. 5218 * context that was in place when entering the current context.
5233 */ 5219 */
5234 void Exit(); 5220 void Exit();
5235 5221
5236 /** Returns true if the context has experienced an out of memory situation. */ 5222 /** Returns true if the context has experienced an out of memory situation. */
5237 bool HasOutOfMemoryException(); 5223 bool HasOutOfMemoryException() { return false; }
5238 5224
5239 /** Returns an isolate associated with a current context. */ 5225 /** Returns an isolate associated with a current context. */
5240 v8::Isolate* GetIsolate(); 5226 v8::Isolate* GetIsolate();
5241 5227
5242 /** 5228 /**
5243 * Gets the embedder data with the given index, which must have been set by a 5229 * Gets the embedder data with the given index, which must have been set by a
5244 * previous call to SetEmbedderData with the same index. Note that index 0 5230 * previous call to SetEmbedderData with the same index. Note that index 0
5245 * currently has a special meaning for Chrome's debugger. 5231 * currently has a special meaning for Chrome's debugger.
5246 */ 5232 */
5247 V8_INLINE Local<Value> GetEmbedderData(int index); 5233 V8_INLINE Local<Value> GetEmbedderData(int index);
(...skipping 1369 matching lines...) Expand 10 before | Expand all | Expand 10 after
6617 */ 6603 */
6618 6604
6619 6605
6620 } // namespace v8 6606 } // namespace v8
6621 6607
6622 6608
6623 #undef TYPE_CHECK 6609 #undef TYPE_CHECK
6624 6610
6625 6611
6626 #endif // V8_H_ 6612 #endif // V8_H_
OLDNEW
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698