Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(99)

Side by Side Diff: Source/bindings/v8/custom/V8WindowCustom.cpp

Issue 310423002: Remove the remaining ScriptState::current etc (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 #include "platform/PlatformScreen.h" 63 #include "platform/PlatformScreen.h"
64 #include "platform/graphics/media/MediaPlayer.h" 64 #include "platform/graphics/media/MediaPlayer.h"
65 #include "wtf/ArrayBuffer.h" 65 #include "wtf/ArrayBuffer.h"
66 #include "wtf/Assertions.h" 66 #include "wtf/Assertions.h"
67 #include "wtf/OwnPtr.h" 67 #include "wtf/OwnPtr.h"
68 68
69 namespace WebCore { 69 namespace WebCore {
70 70
71 // FIXME: There is a lot of duplication with SetTimeoutOrInterval() in V8WorkerG lobalScopeCustom.cpp. 71 // FIXME: There is a lot of duplication with SetTimeoutOrInterval() in V8WorkerG lobalScopeCustom.cpp.
72 // We should refactor this. 72 // We should refactor this.
73 void windowSetTimeoutImpl(const v8::FunctionCallbackInfo<v8::Value>& info, bool singleShot, ExceptionState& exceptionState) 73 static void windowSetTimeoutImpl(const v8::FunctionCallbackInfo<v8::Value>& info , bool singleShot, ExceptionState& exceptionState)
74 { 74 {
75 int argumentCount = info.Length(); 75 int argumentCount = info.Length();
76 76
77 if (argumentCount < 1) 77 if (argumentCount < 1)
78 return; 78 return;
79 79
80 DOMWindow* impl = V8Window::toNative(info.Holder()); 80 DOMWindow* impl = V8Window::toNative(info.Holder());
81 if (!impl->frame() || !impl->document()) { 81 if (!impl->frame() || !impl->document()) {
82 exceptionState.throwDOMException(InvalidAccessError, "No script context is available in which to execute the script."); 82 exceptionState.throwDOMException(InvalidAccessError, "No script context is available in which to execute the script.");
83 return; 83 return;
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::curren t(isolate)); 532 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::curren t(isolate));
533 if (context.IsEmpty()) 533 if (context.IsEmpty())
534 return v8Undefined(); 534 return v8Undefined();
535 535
536 v8::Handle<v8::Object> global = context->Global(); 536 v8::Handle<v8::Object> global = context->Global();
537 ASSERT(!global.IsEmpty()); 537 ASSERT(!global.IsEmpty());
538 return global; 538 return global;
539 } 539 }
540 540
541 } // namespace WebCore 541 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/v8/V8Callback.h ('k') | Source/bindings/v8/custom/V8WorkerGlobalScopeCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698