Chromium Code Reviews| 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 667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 678 const v8::Handle<T>* handle = reinterpret_cast<const v8::Handle<T>*>(&va lue); | 678 const v8::Handle<T>* handle = reinterpret_cast<const v8::Handle<T>*>(&va lue); |
| 679 return *handle; | 679 return *handle; |
| 680 } | 680 } |
| 681 | 681 |
| 682 // Attaches |environment| to |function| and returns it. | 682 // Attaches |environment| to |function| and returns it. |
| 683 inline v8::Local<v8::Function> createClosure(v8::FunctionCallback function, v8::Handle<v8::Value> environment, v8::Isolate* isolate) | 683 inline v8::Local<v8::Function> createClosure(v8::FunctionCallback function, v8::Handle<v8::Value> environment, v8::Isolate* isolate) |
| 684 { | 684 { |
| 685 return v8::Function::New(isolate, function, environment); | 685 return v8::Function::New(isolate, function, environment); |
| 686 } | 686 } |
| 687 | 687 |
| 688 v8::Local<v8::Value> getHiddenValue(v8::Handle<v8::Object>, v8::Handle<v8::S tring>); | |
| 689 bool setHiddenValue(v8::Handle<v8::Object>, v8::Handle<v8::String>, v8::Hand le<v8::Value>); | |
| 690 bool deleteHiddenValue(v8::Handle<v8::Object>, v8::Handle<v8::String>); | |
|
haraken
2014/01/24 09:11:33
As Dan suggested offline, I created these helper m
| |
| 688 v8::Local<v8::Value> getHiddenValueFromMainWorldWrapper(v8::Isolate*, Script Wrappable*, v8::Handle<v8::String> key); | 691 v8::Local<v8::Value> getHiddenValueFromMainWorldWrapper(v8::Isolate*, Script Wrappable*, v8::Handle<v8::String> key); |
| 689 | 692 |
| 690 v8::Isolate* mainThreadIsolate(); | 693 v8::Isolate* mainThreadIsolate(); |
| 691 v8::Isolate* toIsolate(ExecutionContext*); | 694 v8::Isolate* toIsolate(ExecutionContext*); |
| 692 v8::Isolate* toIsolate(Frame*); | 695 v8::Isolate* toIsolate(Frame*); |
| 693 | 696 |
| 694 // Can only be called by blink::initialize | 697 // Can only be called by blink::initialize |
| 695 void setMainThreadIsolate(v8::Isolate*); | 698 void setMainThreadIsolate(v8::Isolate*); |
| 696 | 699 |
| 697 // Converts a DOM object to a v8 value. | 700 // Converts a DOM object to a v8 value. |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 730 } | 733 } |
| 731 | 734 |
| 732 private: | 735 private: |
| 733 v8::Isolate* m_isolate; | 736 v8::Isolate* m_isolate; |
| 734 }; | 737 }; |
| 735 #endif | 738 #endif |
| 736 | 739 |
| 737 } // namespace WebCore | 740 } // namespace WebCore |
| 738 | 741 |
| 739 #endif // V8Binding_h | 742 #endif // V8Binding_h |
| OLD | NEW |