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

Side by Side Diff: test/cctest/cctest.h

Issue 281723007: Remove socket implementation from V8. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: remove from cctest.h Created 6 years, 7 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 | « src/platform/socket.cc ('k') | test/cctest/cctest.gyp » ('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 2008 the V8 project authors. All rights reserved. 1 // Copyright 2008 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 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 ->Run(); 396 ->Run();
397 } 397 }
398 398
399 399
400 static inline v8::Local<v8::Value> CompileRunWithOrigin( 400 static inline v8::Local<v8::Value> CompileRunWithOrigin(
401 const char* source, const char* origin_url) { 401 const char* source, const char* origin_url) {
402 return CompileRunWithOrigin(v8_str(source), origin_url); 402 return CompileRunWithOrigin(v8_str(source), origin_url);
403 } 403 }
404 404
405 405
406 // Pick a slightly different port to allow tests to be run in parallel.
407 static inline int FlagDependentPortOffset() {
408 return ::v8::internal::FLAG_crankshaft == false ? 100 :
409 ::v8::internal::FLAG_always_opt ? 200 : 0;
410 }
411
412
413 // Helper function that simulates a full new-space in the heap. 406 // Helper function that simulates a full new-space in the heap.
414 static inline void SimulateFullSpace(v8::internal::NewSpace* space) { 407 static inline void SimulateFullSpace(v8::internal::NewSpace* space) {
415 int new_linear_size = static_cast<int>( 408 int new_linear_size = static_cast<int>(
416 *space->allocation_limit_address() - *space->allocation_top_address()); 409 *space->allocation_limit_address() - *space->allocation_top_address());
417 if (new_linear_size == 0) return; 410 if (new_linear_size == 0) return;
418 v8::internal::AllocationResult allocation = 411 v8::internal::AllocationResult allocation =
419 space->AllocateRaw(new_linear_size); 412 space->AllocateRaw(new_linear_size);
420 v8::internal::FreeListNode* node = 413 v8::internal::FreeListNode* node =
421 v8::internal::FreeListNode::cast(allocation.ToObjectChecked()); 414 v8::internal::FreeListNode::cast(allocation.ToObjectChecked());
422 node->set_size(space->heap(), new_linear_size); 415 node->set_size(space->heap(), new_linear_size);
(...skipping 24 matching lines...) Expand all
447 CHECK_EQ(0, heap_profiler_->heap_object_map()->FindUntrackedObjects()); 440 CHECK_EQ(0, heap_profiler_->heap_object_map()->FindUntrackedObjects());
448 heap_profiler_->StopHeapObjectsTracking(); 441 heap_profiler_->StopHeapObjectsTracking();
449 } 442 }
450 443
451 private: 444 private:
452 i::HeapProfiler* heap_profiler_; 445 i::HeapProfiler* heap_profiler_;
453 }; 446 };
454 447
455 448
456 #endif // ifndef CCTEST_H_ 449 #endif // ifndef CCTEST_H_
OLDNEW
« no previous file with comments | « src/platform/socket.cc ('k') | test/cctest/cctest.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698