| 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::Local<v8::Value>, v8::Isolate*); | 65 v8::Handle<v8::Value> throwError(v8::Local<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 inline v8::Handle<v8::Value> argumentOrNull(const v8::Arguments& args, int i
ndex) | 73 inline v8::Handle<v8::Value> argumentOrNull(const v8::FunctionCallbackInfo<v
8::Value>& args, int index) |
| 74 { | 74 { |
| 75 return index >= args.Length() ? v8::Local<v8::Value>() : args[index]; | 75 return index >= args.Length() ? v8::Local<v8::Value>() : args[index]; |
| 76 } | 76 } |
| 77 | 77 |
| 78 // 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. |
| 79 // If isolate can be 0, use v8NullWithCheck(). | 79 // If isolate can be 0, use v8NullWithCheck(). |
| 80 inline v8::Handle<v8::Value> v8Null(v8::Isolate* isolate) | 80 inline v8::Handle<v8::Value> v8Null(v8::Isolate* isolate) |
| 81 { | 81 { |
| 82 ASSERT(isolate); | 82 ASSERT(isolate); |
| 83 return V8PerIsolateData::from(isolate)->v8Null(); | 83 return V8PerIsolateData::from(isolate)->v8Null(); |
| (...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 498 // is disabled and it returns true. | 498 // is disabled and it returns true. |
| 499 bool handleOutOfMemory(); | 499 bool handleOutOfMemory(); |
| 500 // FIXME: This should receive an Isolate. | 500 // FIXME: This should receive an Isolate. |
| 501 v8::Local<v8::Value> handleMaxRecursionDepthExceeded(); | 501 v8::Local<v8::Value> handleMaxRecursionDepthExceeded(); |
| 502 | 502 |
| 503 void crashIfV8IsDead(); | 503 void crashIfV8IsDead(); |
| 504 | 504 |
| 505 } // namespace WebCore | 505 } // namespace WebCore |
| 506 | 506 |
| 507 #endif // V8Binding_h | 507 #endif // V8Binding_h |
| OLD | NEW |