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

Side by Side Diff: src/api.cc

Issue 23890027: Add flags to force or prevent setting of isolate.is_memory_constrained. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Change to using Maybe<bool> flags. Created 7 years, 3 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/flag-definitions.h » ('j') | src/flags.cc » ('J')
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 629 matching lines...) Expand 10 before | Expand all | Expand 10 after
640 ASSERT(!isolate->IsInitialized()); 640 ASSERT(!isolate->IsInitialized());
641 bool result = isolate->heap()->ConfigureHeap(young_space_size / 2, 641 bool result = isolate->heap()->ConfigureHeap(young_space_size / 2,
642 old_gen_size, 642 old_gen_size,
643 max_executable_size); 643 max_executable_size);
644 if (!result) return false; 644 if (!result) return false;
645 } 645 }
646 if (constraints->stack_limit() != NULL) { 646 if (constraints->stack_limit() != NULL) {
647 uintptr_t limit = reinterpret_cast<uintptr_t>(constraints->stack_limit()); 647 uintptr_t limit = reinterpret_cast<uintptr_t>(constraints->stack_limit());
648 isolate->stack_guard()->SetStackLimit(limit); 648 isolate->stack_guard()->SetStackLimit(limit);
649 } 649 }
650 if (constraints->is_memory_constrained().has_value) { 650 if (constraints->is_memory_constrained().has_value &&
651 !i::FLAG_force_memory_constrained.has_value) {
651 isolate->set_is_memory_constrained( 652 isolate->set_is_memory_constrained(
652 constraints->is_memory_constrained().value); 653 constraints->is_memory_constrained().value);
653 } 654 }
654 return true; 655 return true;
655 } 656 }
656 657
657 658
658 i::Object** V8::GlobalizeReference(i::Isolate* isolate, i::Object** obj) { 659 i::Object** V8::GlobalizeReference(i::Isolate* isolate, i::Object** obj) {
659 if (IsDeadCheck(isolate, "V8::Persistent::New")) return NULL; 660 if (IsDeadCheck(isolate, "V8::Persistent::New")) return NULL;
660 LOG_API(isolate, "Persistent::New"); 661 LOG_API(isolate, "Persistent::New");
(...skipping 7232 matching lines...) Expand 10 before | Expand all | Expand 10 after
7893 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); 7894 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate());
7894 Address callback_address = 7895 Address callback_address =
7895 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 7896 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
7896 VMState<EXTERNAL> state(isolate); 7897 VMState<EXTERNAL> state(isolate);
7897 ExternalCallbackScope call_scope(isolate, callback_address); 7898 ExternalCallbackScope call_scope(isolate, callback_address);
7898 callback(info); 7899 callback(info);
7899 } 7900 }
7900 7901
7901 7902
7902 } } // namespace v8::internal 7903 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/flag-definitions.h » ('j') | src/flags.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698