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

Side by Side Diff: src/stub-cache.cc

Issue 472002: Fix a crash caused by garbage collection during generation of a... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years 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/stub-cache.h ('k') | 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 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 113
114 Object* StubCache::ComputeLoadCallback(String* name, 114 Object* StubCache::ComputeLoadCallback(String* name,
115 JSObject* receiver, 115 JSObject* receiver,
116 JSObject* holder, 116 JSObject* holder,
117 AccessorInfo* callback) { 117 AccessorInfo* callback) {
118 ASSERT(v8::ToCData<Address>(callback->getter()) != 0); 118 ASSERT(v8::ToCData<Address>(callback->getter()) != 0);
119 Code::Flags flags = Code::ComputeMonomorphicFlags(Code::LOAD_IC, CALLBACKS); 119 Code::Flags flags = Code::ComputeMonomorphicFlags(Code::LOAD_IC, CALLBACKS);
120 Object* code = receiver->map()->FindInCodeCache(name, flags); 120 Object* code = receiver->map()->FindInCodeCache(name, flags);
121 if (code->IsUndefined()) { 121 if (code->IsUndefined()) {
122 LoadStubCompiler compiler; 122 LoadStubCompiler compiler;
123 code = compiler.CompileLoadCallback(receiver, holder, callback, name); 123 code = compiler.CompileLoadCallback(name, receiver, holder, callback);
124 if (code->IsFailure()) return code; 124 if (code->IsFailure()) return code;
125 LOG(CodeCreateEvent(Logger::LOAD_IC_TAG, Code::cast(code), name)); 125 LOG(CodeCreateEvent(Logger::LOAD_IC_TAG, Code::cast(code), name));
126 Object* result = receiver->map()->UpdateCodeCache(name, Code::cast(code)); 126 Object* result = receiver->map()->UpdateCodeCache(name, Code::cast(code));
127 if (result->IsFailure()) return code; 127 if (result->IsFailure()) return code;
128 } 128 }
129 return Set(name, receiver->map(), Code::cast(code)); 129 return Set(name, receiver->map(), Code::cast(code));
130 } 130 }
131 131
132 132
133 Object* StubCache::ComputeLoadConstant(String* name, 133 Object* StubCache::ComputeLoadConstant(String* name,
(...skipping 965 matching lines...) Expand 10 before | Expand all | Expand 10 after
1099 if (!result->IsFailure()) { 1099 if (!result->IsFailure()) {
1100 Code* code = Code::cast(result); 1100 Code* code = Code::cast(result);
1101 USE(code); 1101 USE(code);
1102 LOG(CodeCreateEvent(Logger::STUB_TAG, code, "ConstructStub")); 1102 LOG(CodeCreateEvent(Logger::STUB_TAG, code, "ConstructStub"));
1103 } 1103 }
1104 return result; 1104 return result;
1105 } 1105 }
1106 1106
1107 1107
1108 } } // namespace v8::internal 1108 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/stub-cache.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698