Changeset 20043 in webkit
- Timestamp:
- Mar 7, 2007 5:42:39 PM (17 years ago)
- Location:
- trunk/JavaScriptCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r20026 r20043 1 2007-03-07 Anrong Hu <huanr@yahoo.com> 2 3 Reviewed by Maciej. 4 5 Fix http://bugs.webkit.org/show_bug.cgi?id=12535 6 Bug 12535: Stack-optimizing compilers can trick GC into freeing in-use objects 7 8 * kjs/internal.cpp: 9 (KJS::StringImp::toObject): Copy val onto the stack so it is not subject to garbage collection. 10 1 11 2007-03-07 Geoffrey Garen <ggaren@apple.com> 2 12 -
trunk/JavaScriptCore/kjs/internal.cpp
r15482 r20043 79 79 JSObject *StringImp::toObject(ExecState *exec) const 80 80 { 81 return new StringInstance(exec->lexicalInterpreter()->builtinStringPrototype(), val); 81 // Put the reference onto the stack so it is not subject to garbage collection. 82 // <http://bugs.webkit.org/show_bug.cgi?id=12535> 83 UString valCopy = val; 84 85 return new StringInstance(exec->lexicalInterpreter()->builtinStringPrototype(), valCopy); 82 86 } 83 87
Note: See TracChangeset
for help on using the changeset viewer.