| 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 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 386 { | 386 { |
| 387 ASSERT(startIndex <= args.Length()); | 387 ASSERT(startIndex <= args.Length()); |
| 388 Vector<T> result; | 388 Vector<T> result; |
| 389 typedef NativeValueTraits<T> TraitsType; | 389 typedef NativeValueTraits<T> TraitsType; |
| 390 int length = args.Length(); | 390 int length = args.Length(); |
| 391 for (int i = startIndex; i < length; ++i) | 391 for (int i = startIndex; i < length; ++i) |
| 392 result.append(TraitsType::nativeValue(args[i])); | 392 result.append(TraitsType::nativeValue(args[i])); |
| 393 return result; | 393 return result; |
| 394 } | 394 } |
| 395 | 395 |
| 396 Vector<v8::Handle<v8::Value> > toVectorOfArguments(const v8::Arguments& args
); |
| 397 |
| 396 // Validates that the passed object is a sequence type per WebIDL spec | 398 // Validates that the passed object is a sequence type per WebIDL spec |
| 397 // http://www.w3.org/TR/2012/WD-WebIDL-20120207/#es-sequence | 399 // http://www.w3.org/TR/2012/WD-WebIDL-20120207/#es-sequence |
| 398 inline v8::Handle<v8::Value> toV8Sequence(v8::Handle<v8::Value> value, uint3
2_t& length, v8::Isolate* isolate) | 400 inline v8::Handle<v8::Value> toV8Sequence(v8::Handle<v8::Value> value, uint3
2_t& length, v8::Isolate* isolate) |
| 399 { | 401 { |
| 400 if (!value->IsObject()) { | 402 if (!value->IsObject()) { |
| 401 throwTypeError(0, isolate); | 403 throwTypeError(0, isolate); |
| 402 return v8Undefined(); | 404 return v8Undefined(); |
| 403 } | 405 } |
| 404 | 406 |
| 405 v8::Local<v8::Value> v8Value(v8::Local<v8::Value>::New(value)); | 407 v8::Local<v8::Value> v8Value(v8::Local<v8::Value>::New(value)); |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 494 // is disabled and it returns true. | 496 // is disabled and it returns true. |
| 495 bool handleOutOfMemory(); | 497 bool handleOutOfMemory(); |
| 496 // FIXME: This should receive an Isolate. | 498 // FIXME: This should receive an Isolate. |
| 497 v8::Local<v8::Value> handleMaxRecursionDepthExceeded(); | 499 v8::Local<v8::Value> handleMaxRecursionDepthExceeded(); |
| 498 | 500 |
| 499 void crashIfV8IsDead(); | 501 void crashIfV8IsDead(); |
| 500 | 502 |
| 501 } // namespace WebCore | 503 } // namespace WebCore |
| 502 | 504 |
| 503 #endif // V8Binding_h | 505 #endif // V8Binding_h |
| OLD | NEW |