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

Side by Side Diff: src/isolate.h

Issue 29053002: Provide a mechanism for the embedder to set a TotalPhysicalMemory callback function. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 2 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
« src/api.cc ('K') | « src/defaults.cc ('k') | src/isolate.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 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 // the external callback we're currently in 280 // the external callback we're currently in
281 ExternalCallbackScope* external_callback_scope_; 281 ExternalCallbackScope* external_callback_scope_;
282 StateTag current_vm_state_; 282 StateTag current_vm_state_;
283 283
284 // Generated code scratch locations. 284 // Generated code scratch locations.
285 int32_t formal_count_; 285 int32_t formal_count_;
286 286
287 // Call back function to report unsafe JS accesses. 287 // Call back function to report unsafe JS accesses.
288 v8::FailedAccessCheckCallback failed_access_check_callback_; 288 v8::FailedAccessCheckCallback failed_access_check_callback_;
289 289
290 // Call back function to get total physical memory of the platform.
291 v8::TotalPhysicalMemoryCallback total_physical_memory_callback_;
292
290 // Head of the list of live LookupResults. 293 // Head of the list of live LookupResults.
291 LookupResult* top_lookup_result_; 294 LookupResult* top_lookup_result_;
292 295
293 // Whether out of memory exceptions should be ignored. 296 // Whether out of memory exceptions should be ignored.
294 bool ignore_out_of_memory_; 297 bool ignore_out_of_memory_;
295 298
296 private: 299 private:
297 void InitializeInternal(); 300 void InitializeInternal();
298 301
299 Address try_catch_handler_address_; 302 Address try_catch_handler_address_;
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after
766 bool MayNamedAccess(JSObject* receiver, 769 bool MayNamedAccess(JSObject* receiver,
767 Object* key, 770 Object* key,
768 v8::AccessType type); 771 v8::AccessType type);
769 bool MayIndexedAccess(JSObject* receiver, 772 bool MayIndexedAccess(JSObject* receiver,
770 uint32_t index, 773 uint32_t index,
771 v8::AccessType type); 774 v8::AccessType type);
772 775
773 void SetFailedAccessCheckCallback(v8::FailedAccessCheckCallback callback); 776 void SetFailedAccessCheckCallback(v8::FailedAccessCheckCallback callback);
774 void ReportFailedAccessCheck(JSObject* receiver, v8::AccessType type); 777 void ReportFailedAccessCheck(JSObject* receiver, v8::AccessType type);
775 778
779 void SetTotalPhysicalMemoryCallback(v8::TotalPhysicalMemoryCallback callback);
780
776 // Exception throwing support. The caller should use the result 781 // Exception throwing support. The caller should use the result
777 // of Throw() as its return value. 782 // of Throw() as its return value.
778 Failure* Throw(Object* exception, MessageLocation* location = NULL); 783 Failure* Throw(Object* exception, MessageLocation* location = NULL);
779 // Re-throw an exception. This involves no error reporting since 784 // Re-throw an exception. This involves no error reporting since
780 // error reporting was handled when the exception was thrown 785 // error reporting was handled when the exception was thrown
781 // originally. 786 // originally.
782 Failure* ReThrow(MaybeObject* exception); 787 Failure* ReThrow(MaybeObject* exception);
783 void ScheduleThrow(Object* exception); 788 void ScheduleThrow(Object* exception);
784 // Re-set pending message, script and positions reported to the TryCatch 789 // Re-set pending message, script and positions reported to the TryCatch
785 // back to the TLS for re-use when rethrowing. 790 // back to the TLS for re-use when rethrowing.
(...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after
1502 1507
1503 // Mark the native context with out of memory. 1508 // Mark the native context with out of memory.
1504 inline void Context::mark_out_of_memory() { 1509 inline void Context::mark_out_of_memory() {
1505 native_context()->set_out_of_memory(GetIsolate()->heap()->true_value()); 1510 native_context()->set_out_of_memory(GetIsolate()->heap()->true_value());
1506 } 1511 }
1507 1512
1508 1513
1509 } } // namespace v8::internal 1514 } } // namespace v8::internal
1510 1515
1511 #endif // V8_ISOLATE_H_ 1516 #endif // V8_ISOLATE_H_
OLDNEW
« src/api.cc ('K') | « src/defaults.cc ('k') | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698