OLD | NEW |
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 586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
597 if (context->isDocument()) { | 597 if (context->isDocument()) { |
598 if (LocalFrame* frame = toDocument(context)->frame()) | 598 if (LocalFrame* frame = toDocument(context)->frame()) |
599 return frame->script().windowShell(world)->context(); | 599 return frame->script().windowShell(world)->context(); |
600 } else if (context->isWorkerGlobalScope()) { | 600 } else if (context->isWorkerGlobalScope()) { |
601 if (WorkerScriptController* script = toWorkerGlobalScope(context)->scrip
t()) | 601 if (WorkerScriptController* script = toWorkerGlobalScope(context)->scrip
t()) |
602 return script->context(); | 602 return script->context(); |
603 } | 603 } |
604 return v8::Local<v8::Context>(); | 604 return v8::Local<v8::Context>(); |
605 } | 605 } |
606 | 606 |
607 v8::Local<v8::Context> toV8Context(v8::Isolate* isolate, LocalFrame* frame, DOMW
rapperWorld& world) | 607 v8::Local<v8::Context> toV8Context(LocalFrame* frame, DOMWrapperWorld& world) |
608 { | 608 { |
609 if (!frame) | 609 if (!frame) |
610 return v8::Local<v8::Context>(); | 610 return v8::Local<v8::Context>(); |
611 v8::Local<v8::Context> context = frame->script().windowShell(world)->context
(); | 611 v8::Local<v8::Context> context = frame->script().windowShell(world)->context
(); |
612 if (context.IsEmpty()) | 612 if (context.IsEmpty()) |
613 return v8::Local<v8::Context>(); | 613 return v8::Local<v8::Context>(); |
614 LocalFrame* attachedFrame= toFrameIfNotDetached(context); | 614 LocalFrame* attachedFrame= toFrameIfNotDetached(context); |
615 return frame == attachedFrame ? context : v8::Local<v8::Context>(); | 615 return frame == attachedFrame ? context : v8::Local<v8::Context>(); |
616 } | 616 } |
617 | 617 |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
785 PassRefPtr<TraceEvent::ConvertableToTraceFormat> devToolsTraceEventData(Executio
nContext* context, v8::Handle<v8::Function> function, v8::Isolate* isolate) | 785 PassRefPtr<TraceEvent::ConvertableToTraceFormat> devToolsTraceEventData(Executio
nContext* context, v8::Handle<v8::Function> function, v8::Isolate* isolate) |
786 { | 786 { |
787 int scriptId = 0; | 787 int scriptId = 0; |
788 String resourceName; | 788 String resourceName; |
789 int lineNumber = 1; | 789 int lineNumber = 1; |
790 GetDevToolsFunctionInfo(function, isolate, scriptId, resourceName, lineNumbe
r); | 790 GetDevToolsFunctionInfo(function, isolate, scriptId, resourceName, lineNumbe
r); |
791 return InspectorFunctionCallEvent::data(context, scriptId, resourceName, lin
eNumber); | 791 return InspectorFunctionCallEvent::data(context, scriptId, resourceName, lin
eNumber); |
792 } | 792 } |
793 | 793 |
794 } // namespace WebCore | 794 } // namespace WebCore |
OLD | NEW |