OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 2754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2765 Vector<RefPtr<DOMWrapperWorld> > worlds; | 2765 Vector<RefPtr<DOMWrapperWorld> > worlds; |
2766 DOMWrapperWorld::allWorldsInMainThread(worlds); | 2766 DOMWrapperWorld::allWorldsInMainThread(worlds); |
2767 for (size_t i = 0; i < worlds.size(); i++) { | 2767 for (size_t i = 0; i < worlds.size(); i++) { |
2768 v8::Handle<v8::Object> wrapper = worlds[i]->domDataStore().get<V8Arr
ayBuffer>(object, isolate); | 2768 v8::Handle<v8::Object> wrapper = worlds[i]->domDataStore().get<V8Arr
ayBuffer>(object, isolate); |
2769 if (!wrapper.IsEmpty()) { | 2769 if (!wrapper.IsEmpty()) { |
2770 ASSERT(wrapper->IsArrayBuffer()); | 2770 ASSERT(wrapper->IsArrayBuffer()); |
2771 v8::Handle<v8::ArrayBuffer>::Cast(wrapper)->Neuter(); | 2771 v8::Handle<v8::ArrayBuffer>::Cast(wrapper)->Neuter(); |
2772 } | 2772 } |
2773 } | 2773 } |
2774 } else { | 2774 } else { |
2775 v8::Handle<v8::Object> wrapper = DOMDataStore::current(isolate).get<V8Ar
rayBuffer>(object, isolate); | 2775 v8::Handle<v8::Object> wrapper = DOMWrapperWorld::current(isolate)->domD
ataStore().get<V8ArrayBuffer>(object, isolate); |
2776 if (!wrapper.IsEmpty()) { | 2776 if (!wrapper.IsEmpty()) { |
2777 ASSERT(wrapper->IsArrayBuffer()); | 2777 ASSERT(wrapper->IsArrayBuffer()); |
2778 v8::Handle<v8::ArrayBuffer>::Cast(wrapper)->Neuter(); | 2778 v8::Handle<v8::ArrayBuffer>::Cast(wrapper)->Neuter(); |
2779 } | 2779 } |
2780 } | 2780 } |
2781 } | 2781 } |
2782 | 2782 |
2783 PassOwnPtr<SerializedScriptValue::ArrayBufferContentsArray> SerializedScriptValu
e::transferArrayBuffers(ArrayBufferArray& arrayBuffers, ExceptionState& exceptio
nState, v8::Isolate* isolate) | 2783 PassOwnPtr<SerializedScriptValue::ArrayBufferContentsArray> SerializedScriptValu
e::transferArrayBuffers(ArrayBufferArray& arrayBuffers, ExceptionState& exceptio
nState, v8::Isolate* isolate) |
2784 { | 2784 { |
2785 ASSERT(arrayBuffers.size()); | 2785 ASSERT(arrayBuffers.size()); |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2939 // If the allocated memory was not registered before, then this class is lik
ely | 2939 // If the allocated memory was not registered before, then this class is lik
ely |
2940 // used in a context other then Worker's onmessage environment and the prese
nce of | 2940 // used in a context other then Worker's onmessage environment and the prese
nce of |
2941 // current v8 context is not guaranteed. Avoid calling v8 then. | 2941 // current v8 context is not guaranteed. Avoid calling v8 then. |
2942 if (m_externallyAllocatedMemory) { | 2942 if (m_externallyAllocatedMemory) { |
2943 ASSERT(v8::Isolate::GetCurrent()); | 2943 ASSERT(v8::Isolate::GetCurrent()); |
2944 v8::Isolate::GetCurrent()->AdjustAmountOfExternalAllocatedMemory(-m_exte
rnallyAllocatedMemory); | 2944 v8::Isolate::GetCurrent()->AdjustAmountOfExternalAllocatedMemory(-m_exte
rnallyAllocatedMemory); |
2945 } | 2945 } |
2946 } | 2946 } |
2947 | 2947 |
2948 } // namespace WebCore | 2948 } // namespace WebCore |
OLD | NEW |