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

Side by Side Diff: src/api.cc

Issue 48303004: Remove assertion in SetResourceConstraints. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Comment out the ASSERT. Created 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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 556 matching lines...) Expand 10 before | Expand all | Expand 10 after
567 567
568 568
569 bool SetResourceConstraints(ResourceConstraints* constraints) { 569 bool SetResourceConstraints(ResourceConstraints* constraints) {
570 i::Isolate* isolate = EnterIsolateIfNeeded(); 570 i::Isolate* isolate = EnterIsolateIfNeeded();
571 571
572 int young_space_size = constraints->max_young_space_size(); 572 int young_space_size = constraints->max_young_space_size();
573 int old_gen_size = constraints->max_old_space_size(); 573 int old_gen_size = constraints->max_old_space_size();
574 int max_executable_size = constraints->max_executable_size(); 574 int max_executable_size = constraints->max_executable_size();
575 if (young_space_size != 0 || old_gen_size != 0 || max_executable_size != 0) { 575 if (young_space_size != 0 || old_gen_size != 0 || max_executable_size != 0) {
576 // After initialization it's too late to change Heap constraints. 576 // After initialization it's too late to change Heap constraints.
577 ASSERT(!isolate->IsInitialized()); 577 // TODO(rmcilroy): fix this assert.
578 // ASSERT(!isolate->IsInitialized());
578 bool result = isolate->heap()->ConfigureHeap(young_space_size / 2, 579 bool result = isolate->heap()->ConfigureHeap(young_space_size / 2,
579 old_gen_size, 580 old_gen_size,
580 max_executable_size); 581 max_executable_size);
581 if (!result) return false; 582 if (!result) return false;
582 } 583 }
583 if (constraints->stack_limit() != NULL) { 584 if (constraints->stack_limit() != NULL) {
584 uintptr_t limit = reinterpret_cast<uintptr_t>(constraints->stack_limit()); 585 uintptr_t limit = reinterpret_cast<uintptr_t>(constraints->stack_limit());
585 isolate->stack_guard()->SetStackLimit(limit); 586 isolate->stack_guard()->SetStackLimit(limit);
586 } 587 }
587 return true; 588 return true;
(...skipping 6982 matching lines...) Expand 10 before | Expand all | Expand 10 after
7570 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); 7571 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate());
7571 Address callback_address = 7572 Address callback_address =
7572 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 7573 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
7573 VMState<EXTERNAL> state(isolate); 7574 VMState<EXTERNAL> state(isolate);
7574 ExternalCallbackScope call_scope(isolate, callback_address); 7575 ExternalCallbackScope call_scope(isolate, callback_address);
7575 callback(info); 7576 callback(info);
7576 } 7577 }
7577 7578
7578 7579
7579 } } // namespace v8::internal 7580 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698