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

Side by Side Diff: src/api.cc

Issue 119177: Change handle creation to use Object*, to comply with strict aliasing rules. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 6 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/handles.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 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 } 409 }
410 } 410 }
411 411
412 412
413 int HandleScope::NumberOfHandles() { 413 int HandleScope::NumberOfHandles() {
414 return i::HandleScope::NumberOfHandles(); 414 return i::HandleScope::NumberOfHandles();
415 } 415 }
416 416
417 417
418 void** v8::HandleScope::CreateHandle(void* value) { 418 void** v8::HandleScope::CreateHandle(void* value) {
419 return i::HandleScope::CreateHandle(value); 419 return reinterpret_cast<void**>(
420 i::HandleScope::CreateHandle(reinterpret_cast<i::Object*>(value)));
420 } 421 }
421 422
422 423
423 void Context::Enter() { 424 void Context::Enter() {
424 if (IsDeadCheck("v8::Context::Enter()")) return; 425 if (IsDeadCheck("v8::Context::Enter()")) return;
425 ENTER_V8; 426 ENTER_V8;
426 i::Handle<i::Context> env = Utils::OpenHandle(this); 427 i::Handle<i::Context> env = Utils::OpenHandle(this);
427 thread_local.EnterContext(env); 428 thread_local.EnterContext(env);
428 429
429 thread_local.SaveContext(i::GlobalHandles::Create(i::Top::context())); 430 thread_local.SaveContext(i::GlobalHandles::Create(i::Top::context()));
(...skipping 3058 matching lines...) Expand 10 before | Expand all | Expand 10 after
3488 reinterpret_cast<HandleScopeImplementer*>(storage); 3489 reinterpret_cast<HandleScopeImplementer*>(storage);
3489 List<void**>* blocks_of_archived_thread = thread_local->Blocks(); 3490 List<void**>* blocks_of_archived_thread = thread_local->Blocks();
3490 v8::ImplementationUtilities::HandleScopeData* handle_data_of_archived_thread = 3491 v8::ImplementationUtilities::HandleScopeData* handle_data_of_archived_thread =
3491 &thread_local->handle_scope_data_; 3492 &thread_local->handle_scope_data_;
3492 Iterate(v, blocks_of_archived_thread, handle_data_of_archived_thread); 3493 Iterate(v, blocks_of_archived_thread, handle_data_of_archived_thread);
3493 3494
3494 return storage + ArchiveSpacePerThread(); 3495 return storage + ArchiveSpacePerThread();
3495 } 3496 }
3496 3497
3497 } } // namespace v8::internal 3498 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/handles.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698