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

Side by Side Diff: src/debug.cc

Issue 14021004: Revert r14310 due to isolate tests failure. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 8 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/d8.cc ('k') | src/objects.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 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 594 matching lines...) Expand 10 before | Expand all | Expand 10 after
605 void ScriptCache::Add(Handle<Script> script) { 605 void ScriptCache::Add(Handle<Script> script) {
606 GlobalHandles* global_handles = Isolate::Current()->global_handles(); 606 GlobalHandles* global_handles = Isolate::Current()->global_handles();
607 // Create an entry in the hash map for the script. 607 // Create an entry in the hash map for the script.
608 int id = Smi::cast(script->id())->value(); 608 int id = Smi::cast(script->id())->value();
609 HashMap::Entry* entry = 609 HashMap::Entry* entry =
610 HashMap::Lookup(reinterpret_cast<void*>(id), Hash(id), true); 610 HashMap::Lookup(reinterpret_cast<void*>(id), Hash(id), true);
611 if (entry->value != NULL) { 611 if (entry->value != NULL) {
612 ASSERT(*script == *reinterpret_cast<Script**>(entry->value)); 612 ASSERT(*script == *reinterpret_cast<Script**>(entry->value));
613 return; 613 return;
614 } 614 }
615
615 // Globalize the script object, make it weak and use the location of the 616 // Globalize the script object, make it weak and use the location of the
616 // global handle as the value in the hash map. 617 // global handle as the value in the hash map.
617 Handle<Script> script_ = 618 Handle<Script> script_ =
618 Handle<Script>::cast( 619 Handle<Script>::cast(
619 (global_handles->Create(*script))); 620 (global_handles->Create(*script)));
620 global_handles->MakeWeak(reinterpret_cast<Object**>(script_.location()), 621 global_handles->MakeWeak(reinterpret_cast<Object**>(script_.location()),
621 this, 622 this,
622 NULL, 623 NULL,
623 ScriptCache::HandleWeakScript); 624 ScriptCache::HandleWeakScript);
624 entry->value = script_.location(); 625 entry->value = script_.location();
(...skipping 3170 matching lines...) Expand 10 before | Expand all | Expand 10 after
3795 { 3796 {
3796 Locker locker(reinterpret_cast<v8::Isolate*>(isolate_)); 3797 Locker locker(reinterpret_cast<v8::Isolate*>(isolate_));
3797 isolate_->debugger()->CallMessageDispatchHandler(); 3798 isolate_->debugger()->CallMessageDispatchHandler();
3798 } 3799 }
3799 } 3800 }
3800 } 3801 }
3801 3802
3802 #endif // ENABLE_DEBUGGER_SUPPORT 3803 #endif // ENABLE_DEBUGGER_SUPPORT
3803 3804
3804 } } // namespace v8::internal 3805 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/d8.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698