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

Side by Side Diff: src/api.cc

Issue 242014: Adds an API for setting the stack limit per-thread. (Closed)
Patch Set: Leaves the limits of pending interrupts alone instead of reestablishing them." Created 11 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
« no previous file with comments | « include/v8.h ('k') | src/arm/simulator-arm.h » ('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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 return ImplementationUtilities::True(); 327 return ImplementationUtilities::True();
328 } 328 }
329 329
330 330
331 v8::Handle<Boolean> False() { 331 v8::Handle<Boolean> False() {
332 LOG_API("False"); 332 LOG_API("False");
333 return ImplementationUtilities::False(); 333 return ImplementationUtilities::False();
334 } 334 }
335 335
336 336
337 ResourceConstraints::ResourceConstraints() 337 HeapResourceConstraints::HeapResourceConstraints()
338 : max_young_space_size_(0), 338 : max_young_space_size_(0),
339 max_old_space_size_(0), 339 max_old_space_size_(0) { }
340 stack_limit_(NULL) { }
341 340
342 341
343 bool SetResourceConstraints(ResourceConstraints* constraints) { 342 bool SetHeapResourceConstraints(HeapResourceConstraints* constraints) {
344 bool result = i::Heap::ConfigureHeap(constraints->max_young_space_size(), 343 return i::Heap::ConfigureHeap(constraints->max_young_space_size(),
345 constraints->max_old_space_size()); 344 constraints->max_old_space_size());
346 if (!result) return false;
347 if (constraints->stack_limit() != NULL) {
348 uintptr_t limit = reinterpret_cast<uintptr_t>(constraints->stack_limit());
349 i::StackGuard::SetStackLimit(limit);
350 }
351 return true;
352 } 345 }
353 346
354 347
348 void SetStackLimit(uint32_t* limit) {
349 i::StackGuard::SetStackLimit(reinterpret_cast<uintptr_t>(limit));
350 }
351
352
355 i::Object** V8::GlobalizeReference(i::Object** obj) { 353 i::Object** V8::GlobalizeReference(i::Object** obj) {
356 if (IsDeadCheck("V8::Persistent::New")) return NULL; 354 if (IsDeadCheck("V8::Persistent::New")) return NULL;
357 LOG_API("Persistent::New"); 355 LOG_API("Persistent::New");
358 i::Handle<i::Object> result = 356 i::Handle<i::Object> result =
359 i::GlobalHandles::Create(*obj); 357 i::GlobalHandles::Create(*obj);
360 return result.location(); 358 return result.location();
361 } 359 }
362 360
363 361
364 void V8::MakeWeak(i::Object** object, void* parameters, 362 void V8::MakeWeak(i::Object** object, void* parameters,
(...skipping 3386 matching lines...) Expand 10 before | Expand all | Expand 10 after
3751 3749
3752 3750
3753 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { 3751 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) {
3754 HandleScopeImplementer* thread_local = 3752 HandleScopeImplementer* thread_local =
3755 reinterpret_cast<HandleScopeImplementer*>(storage); 3753 reinterpret_cast<HandleScopeImplementer*>(storage);
3756 thread_local->IterateThis(v); 3754 thread_local->IterateThis(v);
3757 return storage + ArchiveSpacePerThread(); 3755 return storage + ArchiveSpacePerThread();
3758 } 3756 }
3759 3757
3760 } } // namespace v8::internal 3758 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « include/v8.h ('k') | src/arm/simulator-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698