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_; |