| 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 595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 606 // FIXME: Do we need to check that the item function returns a non-n
ull value for this index? | 606 // FIXME: Do we need to check that the item function returns a non-n
ull value for this index? |
| 607 v8::Handle<v8::Integer> integer = v8::Integer::New(i, info.GetIsolat
e()); | 607 v8::Handle<v8::Integer> integer = v8::Integer::New(i, info.GetIsolat
e()); |
| 608 properties->Set(integer, integer); | 608 properties->Set(integer, integer); |
| 609 } | 609 } |
| 610 v8SetReturnValue(info, properties); | 610 v8SetReturnValue(info, properties); |
| 611 } | 611 } |
| 612 | 612 |
| 613 // If the current context causes out of memory, JavaScript setting | 613 // If the current context causes out of memory, JavaScript setting |
| 614 // is disabled and it returns true. | 614 // is disabled and it returns true. |
| 615 bool handleOutOfMemory(); | 615 bool handleOutOfMemory(); |
| 616 // FIXME: This should receive an Isolate. | 616 v8::Local<v8::Value> handleMaxRecursionDepthExceeded(v8::Isolate*); |
| 617 v8::Local<v8::Value> handleMaxRecursionDepthExceeded(); | |
| 618 | 617 |
| 619 void crashIfV8IsDead(); | 618 void crashIfV8IsDead(); |
| 620 | 619 |
| 621 template <class T> | 620 template <class T> |
| 622 v8::Handle<T> unsafeHandleFromRawValue(const T* value) | 621 v8::Handle<T> unsafeHandleFromRawValue(const T* value) |
| 623 { | 622 { |
| 624 const v8::Handle<T>* handle = reinterpret_cast<const v8::Handle<T>*>(&va
lue); | 623 const v8::Handle<T>* handle = reinterpret_cast<const v8::Handle<T>*>(&va
lue); |
| 625 return *handle; | 624 return *handle; |
| 626 } | 625 } |
| 627 | 626 |
| 628 // Attaches |environment| to |function| and returns it. | 627 // Attaches |environment| to |function| and returns it. |
| 629 inline v8::Local<v8::Function> createClosure(v8::FunctionCallback function,
v8::Handle<v8::Value> environment) | 628 inline v8::Local<v8::Function> createClosure(v8::FunctionCallback function,
v8::Handle<v8::Value> environment) |
| 630 { | 629 { |
| 631 return v8::FunctionTemplate::New(function, environment)->GetFunction(); | 630 return v8::FunctionTemplate::New(function, environment)->GetFunction(); |
| 632 } | 631 } |
| 633 | 632 |
| 634 v8::Local<v8::Value> getHiddenValueFromMainWorldWrapper(v8::Isolate*, Script
Wrappable*, v8::Handle<v8::String> key); | 633 v8::Local<v8::Value> getHiddenValueFromMainWorldWrapper(v8::Isolate*, Script
Wrappable*, v8::Handle<v8::String> key); |
| 635 | 634 |
| 636 v8::Isolate* getIsolateFromScriptExecutionContext(ScriptExecutionContext*); | 635 v8::Isolate* getIsolateFromScriptExecutionContext(ScriptExecutionContext*); |
| 637 | 636 |
| 638 } // namespace WebCore | 637 } // namespace WebCore |
| 639 | 638 |
| 640 #endif // V8Binding_h | 639 #endif // V8Binding_h |
| OLD | NEW |