| OLD | NEW | 
|     1 # Copyright (C) 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org> |     1 # Copyright (C) 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org> | 
|     2 # Copyright (C) 2006 Anders Carlsson <andersca@mac.com> |     2 # Copyright (C) 2006 Anders Carlsson <andersca@mac.com> | 
|     3 # Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> |     3 # Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> | 
|     4 # Copyright (C) 2006 Alexey Proskuryakov <ap@webkit.org> |     4 # Copyright (C) 2006 Alexey Proskuryakov <ap@webkit.org> | 
|     5 # Copyright (C) 2006 Apple Computer, Inc. |     5 # Copyright (C) 2006 Apple Computer, Inc. | 
|     6 # Copyright (C) 2007, 2008, 2009, 2012 Google Inc. |     6 # Copyright (C) 2007, 2008, 2009, 2012 Google Inc. | 
|     7 # Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> |     7 # Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> | 
|     8 # Copyright (C) Research In Motion Limited 2010. All rights reserved. |     8 # Copyright (C) Research In Motion Limited 2010. All rights reserved. | 
|     9 # Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |     9 # Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 
|    10 # Copyright (C) 2012 Ericsson AB. All rights reserved. |    10 # Copyright (C) 2012 Ericsson AB. All rights reserved. | 
| (...skipping 3091 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  3102         # If we're in an isolated world, create a SerializedScriptValue and |  3102         # If we're in an isolated world, create a SerializedScriptValue and | 
|  3103         # store it in the event for later cloning if the property is accessed |  3103         # store it in the event for later cloning if the property is accessed | 
|  3104         # from another world. |  3104         # from another world. | 
|  3105         # The main world case is handled lazily (in Custom code). |  3105         # The main world case is handled lazily (in Custom code). | 
|  3106         # |  3106         # | 
|  3107         # We do not clone Error objects (exceptions), for 2 reasons: |  3107         # We do not clone Error objects (exceptions), for 2 reasons: | 
|  3108         # 1) Errors carry a reference to the isolated world's global object, |  3108         # 1) Errors carry a reference to the isolated world's global object, | 
|  3109         #    and thus passing it around would cause leakage. |  3109         #    and thus passing it around would cause leakage. | 
|  3110         # 2) Errors cannot be cloned (or serialized): |  3110         # 2) Errors cannot be cloned (or serialized): | 
|  3111         # http://www.whatwg.org/specs/web-apps/current-work/multipage/common-dom
      -interfaces.html#safe-passing-of-structured-data |  3111         # http://www.whatwg.org/specs/web-apps/current-work/multipage/common-dom
      -interfaces.html#safe-passing-of-structured-data | 
|  3112         $implementation{nameSpaceInternal}->add("    if (isolatedWorldForIsolate
      (info.GetIsolate())) {\n"); |  3112         $implementation{nameSpaceInternal}->add("    if (DOMWrapperWorld::curren
      t(info.GetIsolate())->isIsolatedWorld()) {\n"); | 
|  3113         foreach my $attrName (@anyAttributeNames) { |  3113         foreach my $attrName (@anyAttributeNames) { | 
|  3114             my $setter = "setSerialized" . FirstLetterToUpperCase($attrName); |  3114             my $setter = "setSerialized" . FirstLetterToUpperCase($attrName); | 
|  3115             $implementation{nameSpaceInternal}->add(<<END); |  3115             $implementation{nameSpaceInternal}->add(<<END); | 
|  3116         if (!${attrName}.IsEmpty()) |  3116         if (!${attrName}.IsEmpty()) | 
|  3117             event->${setter}(SerializedScriptValue::createAndSwallowExceptions($
      {attrName}, info.GetIsolate())); |  3117             event->${setter}(SerializedScriptValue::createAndSwallowExceptions($
      {attrName}, info.GetIsolate())); | 
|  3118 END |  3118 END | 
|  3119         } |  3119         } | 
|  3120         $implementation{nameSpaceInternal}->add("    }\n\n"); |  3120         $implementation{nameSpaceInternal}->add("    }\n\n"); | 
|  3121     } |  3121     } | 
|  3122  |  3122  | 
| (...skipping 2008 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  5131     } |  5131     } | 
|  5132     $code .= <<END; |  5132     $code .= <<END; | 
|  5133     v8::Handle<v8::Object> wrapper = ${v8ClassName}::createWrapper(impl, creatio
      nContext, isolate); |  5133     v8::Handle<v8::Object> wrapper = ${v8ClassName}::createWrapper(impl, creatio
      nContext, isolate); | 
|  5134 END |  5134 END | 
|  5135     if ($isDocument) { |  5135     if ($isDocument) { | 
|  5136         AddToImplIncludes("bindings/v8/ScriptController.h"); |  5136         AddToImplIncludes("bindings/v8/ScriptController.h"); | 
|  5137         AddToImplIncludes("bindings/v8/V8WindowShell.h"); |  5137         AddToImplIncludes("bindings/v8/V8WindowShell.h"); | 
|  5138         $code .= <<END; |  5138         $code .= <<END; | 
|  5139     if (wrapper.IsEmpty()) |  5139     if (wrapper.IsEmpty()) | 
|  5140         return wrapper; |  5140         return wrapper; | 
|  5141     if (!isolatedWorldForEnteredContext(isolate)) { |  5141     DOMWrapperWorld* world = DOMWrapperWorld::current(isolate); | 
 |  5142     if (world->isMainWorld()) { | 
|  5142         if (Frame* frame = impl->frame()) |  5143         if (Frame* frame = impl->frame()) | 
|  5143             frame->script().windowShell(DOMWrapperWorld::mainWorld())->updateDoc
      umentWrapper(wrapper); |  5144             frame->script().windowShell(world)->updateDocumentWrapper(wrapper); | 
|  5144     } |  5145     } | 
|  5145 END |  5146 END | 
|  5146     } |  5147     } | 
|  5147     $code .= <<END; |  5148     $code .= <<END; | 
|  5148     return wrapper; |  5149     return wrapper; | 
|  5149 } |  5150 } | 
|  5150  |  5151  | 
|  5151 END |  5152 END | 
|  5152     $implementation{nameSpaceWebCore}->add($code); |  5153     $implementation{nameSpaceWebCore}->add($code); | 
|  5153 } |  5154 } | 
| (...skipping 1337 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  6491         if ($parameter->type eq "SerializedScriptValue") { |  6492         if ($parameter->type eq "SerializedScriptValue") { | 
|  6492             return 1; |  6493             return 1; | 
|  6493         } elsif (IsIntegerType($parameter->type)) { |  6494         } elsif (IsIntegerType($parameter->type)) { | 
|  6494             return 1; |  6495             return 1; | 
|  6495         } |  6496         } | 
|  6496     } |  6497     } | 
|  6497     return 0; |  6498     return 0; | 
|  6498 } |  6499 } | 
|  6499  |  6500  | 
|  6500 1; |  6501 1; | 
| OLD | NEW |