| 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 596 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  607  |  607  | 
|  608         return v8Value; |  608         return v8Value; | 
|  609     } |  609     } | 
|  610  |  610  | 
|  611     v8::Isolate* toIsolate(ExecutionContext*); |  611     v8::Isolate* toIsolate(ExecutionContext*); | 
|  612     v8::Isolate* toIsolate(Frame*); |  612     v8::Isolate* toIsolate(Frame*); | 
|  613  |  613  | 
|  614     WrapperWorldType worldType(v8::Isolate*); |  614     WrapperWorldType worldType(v8::Isolate*); | 
|  615     WrapperWorldType worldTypeInMainThread(v8::Isolate*); |  615     WrapperWorldType worldTypeInMainThread(v8::Isolate*); | 
|  616  |  616  | 
|  617     DOMWrapperWorld* isolatedWorldForIsolate(v8::Isolate*); |  | 
|  618  |  | 
|  619     DOMWindow* toDOMWindow(v8::Handle<v8::Value>, v8::Isolate*); |  617     DOMWindow* toDOMWindow(v8::Handle<v8::Value>, v8::Isolate*); | 
|  620     DOMWindow* toDOMWindow(v8::Handle<v8::Context>); |  618     DOMWindow* toDOMWindow(v8::Handle<v8::Context>); | 
|  621     ExecutionContext* toExecutionContext(v8::Handle<v8::Context>); |  619     ExecutionContext* toExecutionContext(v8::Handle<v8::Context>); | 
|  622  |  620  | 
|  623     DOMWindow* activeDOMWindow(v8::Isolate*); |  621     DOMWindow* activeDOMWindow(v8::Isolate*); | 
|  624     ExecutionContext* activeExecutionContext(v8::Isolate*); |  622     ExecutionContext* activeExecutionContext(v8::Isolate*); | 
|  625     DOMWindow* firstDOMWindow(v8::Isolate*); |  623     DOMWindow* firstDOMWindow(v8::Isolate*); | 
|  626     Document* currentDocument(v8::Isolate*); |  624     Document* currentDocument(v8::Isolate*); | 
|  627     ExecutionContext* currentExecutionContext(v8::Isolate*); |  625     ExecutionContext* currentExecutionContext(v8::Isolate*); | 
|  628  |  626  | 
|  629     // Returns a V8 context associated with a ExecutionContext and a DOMWrapperW
     orld. |  627     // Returns a V8 context associated with a ExecutionContext and a DOMWrapperW
     orld. | 
|  630     // This method returns an empty context if there is no frame or the frame is
      already detached. |  628     // This method returns an empty context if there is no frame or the frame is
      already detached. | 
|  631     v8::Local<v8::Context> toV8Context(ExecutionContext*, DOMWrapperWorld*); |  629     v8::Local<v8::Context> toV8Context(ExecutionContext*, DOMWrapperWorld*); | 
|  632     // Returns a V8 context associated with a Frame and a DOMWrapperWorld. |  630     // Returns a V8 context associated with a Frame and a DOMWrapperWorld. | 
|  633     // This method returns an empty context if the frame is already detached. |  631     // This method returns an empty context if the frame is already detached. | 
|  634     v8::Local<v8::Context> toV8Context(v8::Isolate*, Frame*, DOMWrapperWorld*); |  632     v8::Local<v8::Context> toV8Context(v8::Isolate*, Frame*, DOMWrapperWorld*); | 
|  635  |  633  | 
|  636     // Returns the frame object of the window object associated with |  634     // Returns the frame object of the window object associated with | 
|  637     // a context, if the window is currently being displayed in the Frame. |  635     // a context, if the window is currently being displayed in the Frame. | 
|  638     Frame* toFrameIfNotDetached(v8::Handle<v8::Context>); |  636     Frame* toFrameIfNotDetached(v8::Handle<v8::Context>); | 
|  639  |  637  | 
|  640     inline DOMWrapperWorld* isolatedWorldForEnteredContext(v8::Isolate* isolate) |  | 
|  641     { |  | 
|  642         v8::Handle<v8::Context> context = isolate->GetEnteredContext(); |  | 
|  643         if (context.IsEmpty()) |  | 
|  644             return 0; |  | 
|  645         return DOMWrapperWorld::isolatedWorld(context); |  | 
|  646     } |  | 
|  647  |  | 
|  648     // If the current context causes out of memory, JavaScript setting |  638     // If the current context causes out of memory, JavaScript setting | 
|  649     // is disabled and it returns true. |  639     // is disabled and it returns true. | 
|  650     bool handleOutOfMemory(); |  640     bool handleOutOfMemory(); | 
|  651     v8::Local<v8::Value> handleMaxRecursionDepthExceeded(v8::Isolate*); |  641     v8::Local<v8::Value> handleMaxRecursionDepthExceeded(v8::Isolate*); | 
|  652     void crashIfV8IsDead(); |  642     void crashIfV8IsDead(); | 
|  653  |  643  | 
|  654     inline bool isUndefinedOrNull(v8::Handle<v8::Value> value) |  644     inline bool isUndefinedOrNull(v8::Handle<v8::Value> value) | 
|  655     { |  645     { | 
|  656         return value->IsNull() || value->IsUndefined(); |  646         return value->IsNull() || value->IsUndefined(); | 
|  657     } |  647     } | 
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  725             m_isolate->ClearInterrupt(); |  715             m_isolate->ClearInterrupt(); | 
|  726         } |  716         } | 
|  727  |  717  | 
|  728     private: |  718     private: | 
|  729         v8::Isolate* m_isolate; |  719         v8::Isolate* m_isolate; | 
|  730     }; |  720     }; | 
|  731  |  721  | 
|  732 } // namespace WebCore |  722 } // namespace WebCore | 
|  733  |  723  | 
|  734 #endif // V8Binding_h |  724 #endif // V8Binding_h | 
| OLD | NEW |