diff options
author | ager@chromium.org <ager@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-01 07:41:48 +0000 |
---|---|---|
committer | ager@chromium.org <ager@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-01 07:41:48 +0000 |
commit | e3f38ad3766e4dc05c80501afded493acc1f26bf (patch) | |
tree | 124069ab0ee338d2071d1de8d950a1abbbca0f7c /webkit | |
parent | 6f5fa554915482b3735c2486b5b4d36da48c1680 (diff) | |
download | chromium_src-e3f38ad3766e4dc05c80501afded493acc1f26bf.zip chromium_src-e3f38ad3766e4dc05c80501afded493acc1f26bf.tar.gz chromium_src-e3f38ad3766e4dc05c80501afded493acc1f26bf.tar.bz2 |
Undo the reference counting experiment. The crashes are still
happening, so it seems unlikely that this is a reference counting
problem.
BUG=9746
Review URL: http://codereview.chromium.org/100247
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15038 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/port/bindings/v8/v8_binding.cpp | 32 |
1 files changed, 2 insertions, 30 deletions
diff --git a/webkit/port/bindings/v8/v8_binding.cpp b/webkit/port/bindings/v8/v8_binding.cpp index b7c3690..0df0839 100644 --- a/webkit/port/bindings/v8/v8_binding.cpp +++ b/webkit/port/bindings/v8/v8_binding.cpp @@ -19,30 +19,9 @@ namespace WebCore { 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 @@ class WebCoreStringResource: public v8::String::ExternalStringResource { 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_; |