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

Side by Side Diff: Source/bindings/core/v8/V8Binding.cpp

Issue 1115923002: workers: Rename WorkerThread to WorkerScript. Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: . Created 5 years, 7 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) 2006, 2007, 2008, 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009 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 744 matching lines...) Expand 10 before | Expand all | Expand 10 after
755 return 0; 755 return 0;
756 } 756 }
757 757
758 v8::Local<v8::Context> toV8Context(ExecutionContext* context, DOMWrapperWorld& w orld) 758 v8::Local<v8::Context> toV8Context(ExecutionContext* context, DOMWrapperWorld& w orld)
759 { 759 {
760 ASSERT(context); 760 ASSERT(context);
761 if (context->isDocument()) { 761 if (context->isDocument()) {
762 if (LocalFrame* frame = toDocument(context)->frame()) 762 if (LocalFrame* frame = toDocument(context)->frame())
763 return frame->script().windowProxy(world)->context(); 763 return frame->script().windowProxy(world)->context();
764 } else if (context->isWorkerGlobalScope()) { 764 } else if (context->isWorkerGlobalScope()) {
765 if (WorkerScriptController* script = toWorkerGlobalScope(context)->scrip t()) 765 if (WorkerScriptController* script = toWorkerGlobalScope(context)->scrip tController())
766 return script->context(); 766 return script->context();
767 } 767 }
768 return v8::Local<v8::Context>(); 768 return v8::Local<v8::Context>();
769 } 769 }
770 770
771 v8::Local<v8::Context> toV8Context(Frame* frame, DOMWrapperWorld& world) 771 v8::Local<v8::Context> toV8Context(Frame* frame, DOMWrapperWorld& world)
772 { 772 {
773 if (!frame) 773 if (!frame)
774 return v8::Local<v8::Context>(); 774 return v8::Local<v8::Context>();
775 v8::Local<v8::Context> context = frame->windowProxy(world)->context(); 775 v8::Local<v8::Context> context = frame->windowProxy(world)->context();
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
988 v8::Local<v8::Value> data = info.Data(); 988 v8::Local<v8::Value> data = info.Data();
989 ASSERT(data->IsExternal()); 989 ASSERT(data->IsExternal());
990 V8PerContextData* perContextData = V8PerContextData::from(info.Holder()->Cre ationContext()); 990 V8PerContextData* perContextData = V8PerContextData::from(info.Holder()->Cre ationContext());
991 if (!perContextData) 991 if (!perContextData)
992 return; 992 return;
993 v8SetReturnValue(info, perContextData->constructorForType(WrapperTypeInfo::u nwrap(data))); 993 v8SetReturnValue(info, perContextData->constructorForType(WrapperTypeInfo::u nwrap(data)));
994 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 994 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
995 } 995 }
996 996
997 } // namespace blink 997 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698