| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2012 Ericsson AB. All rights reserved. | 3 * Copyright (C) 2012 Ericsson AB. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 | 63 |
| 64 // Schedule a JavaScript error to be thrown. | 64 // Schedule a JavaScript error to be thrown. |
| 65 v8::Handle<v8::Value> throwError(v8::Handle<v8::Value>, v8::Isolate*); | 65 v8::Handle<v8::Value> throwError(v8::Handle<v8::Value>, v8::Isolate*); |
| 66 | 66 |
| 67 // A helper for throwing JavaScript TypeError. | 67 // A helper for throwing JavaScript TypeError. |
| 68 v8::Handle<v8::Value> throwTypeError(const char*, v8::Isolate*); | 68 v8::Handle<v8::Value> throwTypeError(const char*, v8::Isolate*); |
| 69 | 69 |
| 70 // A helper for throwing JavaScript TypeError for not enough arguments. | 70 // A helper for throwing JavaScript TypeError for not enough arguments. |
| 71 v8::Handle<v8::Value> throwNotEnoughArgumentsError(v8::Isolate*); | 71 v8::Handle<v8::Value> throwNotEnoughArgumentsError(v8::Isolate*); |
| 72 | 72 |
| 73 v8::ArrayBuffer::Allocator* v8ArrayBufferAllocator(); | |
| 74 | |
| 75 inline v8::Handle<v8::Value> argumentOrNull(const v8::FunctionCallbackInfo<v
8::Value>& args, int index) | 73 inline v8::Handle<v8::Value> argumentOrNull(const v8::FunctionCallbackInfo<v
8::Value>& args, int index) |
| 76 { | 74 { |
| 77 return index >= args.Length() ? v8::Local<v8::Value>() : args[index]; | 75 return index >= args.Length() ? v8::Local<v8::Value>() : args[index]; |
| 78 } | 76 } |
| 79 | 77 |
| 80 // A fast accessor for v8::Null(isolate). isolate must not be 0. | 78 // A fast accessor for v8::Null(isolate). isolate must not be 0. |
| 81 // If isolate can be 0, use v8NullWithCheck(). | 79 // If isolate can be 0, use v8NullWithCheck(). |
| 82 inline v8::Handle<v8::Value> v8Null(v8::Isolate* isolate) | 80 inline v8::Handle<v8::Value> v8Null(v8::Isolate* isolate) |
| 83 { | 81 { |
| 84 ASSERT(isolate); | 82 ASSERT(isolate); |
| (...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 573 template <class T> | 571 template <class T> |
| 574 v8::Handle<T> unsafeHandleFromRawValue(const T* value) | 572 v8::Handle<T> unsafeHandleFromRawValue(const T* value) |
| 575 { | 573 { |
| 576 const v8::Handle<T>* handle = reinterpret_cast<const v8::Handle<T>*>(&va
lue); | 574 const v8::Handle<T>* handle = reinterpret_cast<const v8::Handle<T>*>(&va
lue); |
| 577 return *handle; | 575 return *handle; |
| 578 } | 576 } |
| 579 | 577 |
| 580 } // namespace WebCore | 578 } // namespace WebCore |
| 581 | 579 |
| 582 #endif // V8Binding_h | 580 #endif // V8Binding_h |
| OLD | NEW |