| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 | 25 |
| 26 #include "config.h" | 26 #include "config.h" |
| 27 #include "bindings/core/v8/V8ValueCache.h" | 27 #include "bindings/core/v8/V8ValueCache.h" |
| 28 | 28 |
| 29 #include "bindings/core/v8/V8Binding.h" | 29 #include "bindings/core/v8/V8Binding.h" |
| 30 #include "wtf/text/StringHash.h" | 30 #include "wtf/text/StringHash.h" |
| 31 | 31 |
| 32 namespace blink { | 32 namespace blink { |
| 33 | 33 |
| 34 StringCacheMapTraits::MapType* StringCacheMapTraits::MapFromWeakCallbackData( | 34 StringCacheMapTraits::MapType* StringCacheMapTraits::MapFromWeakCallbackData( |
| 35 const v8::WeakCallbackData<v8::String, WeakCallbackDataType>& data) | 35 const v8::PhantomCallbackData<WeakCallbackDataType>& data) |
| 36 { | 36 { |
| 37 return &(V8PerIsolateData::from(data.GetIsolate())->stringCache()->m_stringC
ache); | 37 return &(V8PerIsolateData::from(data.GetIsolate())->stringCache()->m_stringC
ache); |
| 38 } | 38 } |
| 39 | 39 |
| 40 | 40 |
| 41 void StringCacheMapTraits::Dispose( | 41 void StringCacheMapTraits::Dispose( |
| 42 v8::Isolate* isolate, v8::UniquePersistent<v8::String> value, StringImpl* ke
y) | 42 v8::Isolate* isolate, v8::UniquePersistent<v8::String> value, StringImpl* ke
y) |
| 43 { | 43 { |
| 44 V8PerIsolateData::from(isolate)->stringCache()->InvalidateLastString(); | 44 V8PerIsolateData::from(isolate)->stringCache()->InvalidateLastString(); |
| 45 key->deref(); | 45 key->deref(); |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 return newString; | 123 return newString; |
| 124 } | 124 } |
| 125 | 125 |
| 126 void StringCache::InvalidateLastString() | 126 void StringCache::InvalidateLastString() |
| 127 { | 127 { |
| 128 m_lastStringImpl = nullptr; | 128 m_lastStringImpl = nullptr; |
| 129 m_lastV8String.Reset(); | 129 m_lastV8String.Reset(); |
| 130 } | 130 } |
| 131 | 131 |
| 132 } // namespace blink | 132 } // namespace blink |
| OLD | NEW |