| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009, 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2009, 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 { | 73 { |
| 74 int argumentCount = args.Length(); | 74 int argumentCount = args.Length(); |
| 75 | 75 |
| 76 if (argumentCount < 1) | 76 if (argumentCount < 1) |
| 77 return; | 77 return; |
| 78 | 78 |
| 79 DOMWindow* imp = V8Window::toNative(args.Holder()); | 79 DOMWindow* imp = V8Window::toNative(args.Holder()); |
| 80 ScriptExecutionContext* scriptContext = static_cast<ScriptExecutionContext*>
(imp->document()); | 80 ScriptExecutionContext* scriptContext = static_cast<ScriptExecutionContext*>
(imp->document()); |
| 81 | 81 |
| 82 if (!scriptContext) { | 82 if (!scriptContext) { |
| 83 setDOMException(INVALID_ACCESS_ERR, args.GetIsolate()); | 83 setDOMException(InvalidAccessError, args.GetIsolate()); |
| 84 return; | 84 return; |
| 85 } | 85 } |
| 86 | 86 |
| 87 v8::Handle<v8::Value> function = args[0]; | 87 v8::Handle<v8::Value> function = args[0]; |
| 88 WTF::String functionString; | 88 WTF::String functionString; |
| 89 if (!function->IsFunction()) { | 89 if (!function->IsFunction()) { |
| 90 if (function->IsString()) { | 90 if (function->IsString()) { |
| 91 functionString = toWebCoreString(function); | 91 functionString = toWebCoreString(function); |
| 92 } else { | 92 } else { |
| 93 v8::Handle<v8::Value> v8String = function->ToString(); | 93 v8::Handle<v8::Value> v8String = function->ToString(); |
| (...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 589 ASSERT(!global.IsEmpty()); | 589 ASSERT(!global.IsEmpty()); |
| 590 return global; | 590 return global; |
| 591 } | 591 } |
| 592 | 592 |
| 593 v8::Handle<v8::Value> toV8ForMainWorld(DOMWindow* window, v8::Handle<v8::Object>
creationContext, v8::Isolate* isolate) | 593 v8::Handle<v8::Value> toV8ForMainWorld(DOMWindow* window, v8::Handle<v8::Object>
creationContext, v8::Isolate* isolate) |
| 594 { | 594 { |
| 595 return toV8(window, creationContext, isolate); | 595 return toV8(window, creationContext, isolate); |
| 596 } | 596 } |
| 597 | 597 |
| 598 } // namespace WebCore | 598 } // namespace WebCore |
| OLD | NEW |