| 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 651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 662 // Unfortunately, when processing script from a plug-in, we might not | 662 // Unfortunately, when processing script from a plug-in, we might not |
| 663 // have a calling context. In those cases, we fall back to the | 663 // have a calling context. In those cases, we fall back to the |
| 664 // entered context. | 664 // entered context. |
| 665 context = isolate->GetEnteredContext(); | 665 context = isolate->GetEnteredContext(); |
| 666 } | 666 } |
| 667 return toExecutionContext(context); | 667 return toExecutionContext(context); |
| 668 } | 668 } |
| 669 | 669 |
| 670 LocalFrame* toFrameIfNotDetached(v8::Handle<v8::Context> context) | 670 LocalFrame* toFrameIfNotDetached(v8::Handle<v8::Context> context) |
| 671 { | 671 { |
| 672 // FIXME(sky): remove. | 672 return toDOMWindow(context)->frame(); |
| 673 LocalDOMWindow* window = toDOMWindow(context); | |
| 674 return window->frame(); | |
| 675 } | 673 } |
| 676 | 674 |
| 677 v8::Local<v8::Context> toV8Context(ExecutionContext* context, DOMWrapperWorld& w
orld) | 675 v8::Local<v8::Context> toV8Context(ExecutionContext* context, DOMWrapperWorld& w
orld) |
| 678 { | 676 { |
| 679 ASSERT(context); | 677 ASSERT(context); |
| 680 if (LocalFrame* frame = toDocument(context)->frame()) | 678 if (LocalFrame* frame = toDocument(context)->frame()) |
| 681 return frame->script().windowProxy(world)->context(); | 679 return frame->script().windowProxy(world)->context(); |
| 682 return v8::Local<v8::Context>(); | 680 return v8::Local<v8::Context>(); |
| 683 } | 681 } |
| 684 | 682 |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 857 PassRefPtr<TraceEvent::ConvertableToTraceFormat> devToolsTraceEventData(Executio
nContext* context, v8::Handle<v8::Function> function, v8::Isolate* isolate) | 855 PassRefPtr<TraceEvent::ConvertableToTraceFormat> devToolsTraceEventData(Executio
nContext* context, v8::Handle<v8::Function> function, v8::Isolate* isolate) |
| 858 { | 856 { |
| 859 int scriptId = 0; | 857 int scriptId = 0; |
| 860 String resourceName; | 858 String resourceName; |
| 861 int lineNumber = 1; | 859 int lineNumber = 1; |
| 862 GetDevToolsFunctionInfo(function, isolate, scriptId, resourceName, lineNumbe
r); | 860 GetDevToolsFunctionInfo(function, isolate, scriptId, resourceName, lineNumbe
r); |
| 863 return InspectorFunctionCallEvent::data(context, scriptId, resourceName, lin
eNumber); | 861 return InspectorFunctionCallEvent::data(context, scriptId, resourceName, lin
eNumber); |
| 864 } | 862 } |
| 865 | 863 |
| 866 } // namespace blink | 864 } // namespace blink |
| OLD | NEW |