| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2009, 2012 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 19 matching lines...) Expand all Loading... |
| 30 | 30 |
| 31 #include "config.h" | 31 #include "config.h" |
| 32 | 32 |
| 33 #include "WorkerScriptController.h" | 33 #include "WorkerScriptController.h" |
| 34 | 34 |
| 35 #include "DOMTimer.h" | 35 #include "DOMTimer.h" |
| 36 #include "ScriptCallStack.h" | 36 #include "ScriptCallStack.h" |
| 37 #include "ScriptRunner.h" | 37 #include "ScriptRunner.h" |
| 38 #include "ScriptSourceCode.h" | 38 #include "ScriptSourceCode.h" |
| 39 #include "ScriptValue.h" | 39 #include "ScriptValue.h" |
| 40 #include "V8GCController.h" |
| 40 #include "V8DedicatedWorkerContext.h" | 41 #include "V8DedicatedWorkerContext.h" |
| 41 #include "V8Initializer.h" | 42 #include "V8Initializer.h" |
| 42 #include "V8SharedWorkerContext.h" | 43 #include "V8SharedWorkerContext.h" |
| 43 #include "V8WorkerContext.h" | 44 #include "V8WorkerContext.h" |
| 44 #include "WorkerContext.h" | 45 #include "WorkerContext.h" |
| 45 #include "WorkerObjectProxy.h" | 46 #include "WorkerObjectProxy.h" |
| 46 #include "WorkerThread.h" | 47 #include "WorkerThread.h" |
| 47 #include "WrapperTypeInfo.h" | 48 #include "WrapperTypeInfo.h" |
| 48 #include <v8.h> | 49 #include <v8.h> |
| 49 | 50 |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 v8::Handle<v8::Object> global = context->Global(); | 249 v8::Handle<v8::Object> global = context->Global(); |
| 249 global = global->FindInstanceInPrototypeChain(V8WorkerContext::GetTemplate(c
ontext->GetIsolate(), WorkerWorld)); | 250 global = global->FindInstanceInPrototypeChain(V8WorkerContext::GetTemplate(c
ontext->GetIsolate(), WorkerWorld)); |
| 250 // Return 0 if the current executing context is not the worker context. | 251 // Return 0 if the current executing context is not the worker context. |
| 251 if (global.IsEmpty()) | 252 if (global.IsEmpty()) |
| 252 return 0; | 253 return 0; |
| 253 WorkerContext* workerContext = V8WorkerContext::toNative(global); | 254 WorkerContext* workerContext = V8WorkerContext::toNative(global); |
| 254 return workerContext->script(); | 255 return workerContext->script(); |
| 255 } | 256 } |
| 256 | 257 |
| 257 } // namespace WebCore | 258 } // namespace WebCore |
| OLD | NEW |