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

Unified Diff: webkit/port/bindings/v8/v8_binding.cpp

Issue 100247: Undo the reference counting experiment. The crashes are still... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/port/bindings/v8/v8_binding.cpp
===================================================================
--- webkit/port/bindings/v8/v8_binding.cpp (revision 15028)
+++ webkit/port/bindings/v8/v8_binding.cpp (working copy)
@@ -19,30 +19,9 @@
class WebCoreStringResource: public v8::String::ExternalStringResource {
public:
explicit WebCoreStringResource(const String& str)
- : impl_(str.impl()) {
- // We seem to be occasionally losing the backing string for external
- // strings: http://crbug.com/9746
- //
- // In order to verify that this is caused by a ref counting bug, we
- // artificially increase the ref count on the backing string until
- // we are done using it for external strings.
- //
- // TODO(ager): This is temporary and should be removed once we have
- // found the underlying cause of the problem.
- for (int i = 0; i < kArtificialRefIncrease; i++) {
- impl_.impl()->ref();
- }
- }
+ : impl_(str.impl()) { }
- virtual ~WebCoreStringResource() {
- // Remove the artificial ref counts added in the constructor.
- //
- // TODO(ager): This is temporary and should be removed once we have
- // found the underlying cause of the problem.
- for (int i = 0; i < kArtificialRefIncrease; i++) {
- impl_.impl()->deref();
- }
- }
+ virtual ~WebCoreStringResource() {}
const uint16_t* data() const {
return reinterpret_cast<const uint16_t*>(impl_.characters());
@@ -53,13 +32,6 @@
String webcore_string() { return impl_; }
private:
- // The amount by which we artificially increase the reference count
- // of the backing string.
- //
- // TODO(ager): This is temporary and should be removed once we have
- // found the underlying cause of the problem.
- static const int kArtificialRefIncrease = 5;
-
// A shallow copy of the string.
// Keeps the string buffer alive until the V8 engine garbage collects it.
String impl_;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698