| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 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 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 | 99 |
| 100 v8::Handle<v8::Value> throwNotEnoughArgumentsError(v8::Isolate* isolate) | 100 v8::Handle<v8::Value> throwNotEnoughArgumentsError(v8::Isolate* isolate) |
| 101 { | 101 { |
| 102 return V8ThrowException::throwNotEnoughArgumentsError(isolate); | 102 return V8ThrowException::throwNotEnoughArgumentsError(isolate); |
| 103 } | 103 } |
| 104 | 104 |
| 105 class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator { | 105 class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator { |
| 106 virtual void* Allocate(size_t size) OVERRIDE | 106 virtual void* Allocate(size_t size) OVERRIDE |
| 107 { | 107 { |
| 108 void* data; | 108 void* data; |
| 109 if (WTF::ArrayBufferContents::allocateMemory(size, WTF::ArrayBufferConte
nts::ZeroInitialize, data)) | 109 WTF::ArrayBufferContents::allocateMemory(size, WTF::ArrayBufferContents:
:ZeroInitialize, data); |
| 110 return data; | 110 return data; |
| 111 return 0; | |
| 112 } | 111 } |
| 113 | 112 |
| 114 virtual void Free(void* data) | 113 virtual void Free(void* data) |
| 115 { | 114 { |
| 116 WTF::ArrayBufferContents::freeMemory(data); | 115 WTF::ArrayBufferContents::freeMemory(data); |
| 117 } | 116 } |
| 118 | 117 |
| 119 virtual void Free(void* data, size_t size) | 118 virtual void Free(void* data, size_t size) |
| 120 { | 119 { |
| 121 UNUSED_PARAM(size); | 120 UNUSED_PARAM(size); |
| (...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 567 return DOMWrapperWorld::isolatedWorld(v8::Context::GetCurrent()); | 566 return DOMWrapperWorld::isolatedWorld(v8::Context::GetCurrent()); |
| 568 } | 567 } |
| 569 | 568 |
| 570 v8::Local<v8::Value> getHiddenValueFromMainWorldWrapper(v8::Isolate* isolate, Sc
riptWrappable* wrappable, v8::Handle<v8::String> key) | 569 v8::Local<v8::Value> getHiddenValueFromMainWorldWrapper(v8::Isolate* isolate, Sc
riptWrappable* wrappable, v8::Handle<v8::String> key) |
| 571 { | 570 { |
| 572 v8::Local<v8::Object> wrapper = wrappable->newLocalWrapper(isolate); | 571 v8::Local<v8::Object> wrapper = wrappable->newLocalWrapper(isolate); |
| 573 return wrapper.IsEmpty() ? v8::Local<v8::Value>() : wrapper->GetHiddenValue(
key); | 572 return wrapper.IsEmpty() ? v8::Local<v8::Value>() : wrapper->GetHiddenValue(
key); |
| 574 } | 573 } |
| 575 | 574 |
| 576 } // namespace WebCore | 575 } // namespace WebCore |
| OLD | NEW |