| 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 707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 718 } | 718 } |
| 719 | 719 |
| 720 LocalDOMWindow* toLocalDOMWindow(v8::Local<v8::Context> context) { | 720 LocalDOMWindow* toLocalDOMWindow(v8::Local<v8::Context> context) { |
| 721 if (context.IsEmpty()) | 721 if (context.IsEmpty()) |
| 722 return 0; | 722 return 0; |
| 723 return toLocalDOMWindow( | 723 return toLocalDOMWindow( |
| 724 toDOMWindow(context->GetIsolate(), context->Global())); | 724 toDOMWindow(context->GetIsolate(), context->Global())); |
| 725 } | 725 } |
| 726 | 726 |
| 727 LocalDOMWindow* enteredDOMWindow(v8::Isolate* isolate) { | 727 LocalDOMWindow* enteredDOMWindow(v8::Isolate* isolate) { |
| 728 V8PerIsolateData* perIsolateData = V8PerIsolateData::from(isolate); |
| 728 LocalDOMWindow* window = | 729 LocalDOMWindow* window = |
| 729 toLocalDOMWindow(isolate->GetEnteredOrMicrotaskContext()); | 730 toLocalDOMWindow(toDOMWindow(perIsolateData->entryContext())); |
| 730 DCHECK(window); | 731 DCHECK(window); |
| 731 return window; | 732 return window; |
| 732 } | 733 } |
| 733 | 734 |
| 734 LocalDOMWindow* currentDOMWindow(v8::Isolate* isolate) { | 735 LocalDOMWindow* currentDOMWindow(v8::Isolate* isolate) { |
| 735 return toLocalDOMWindow(isolate->GetCurrentContext()); | 736 return toLocalDOMWindow(isolate->GetCurrentContext()); |
| 736 } | 737 } |
| 737 | 738 |
| 738 ExecutionContext* toExecutionContext(v8::Local<v8::Context> context) { | 739 ExecutionContext* toExecutionContext(v8::Local<v8::Context> context) { |
| 739 if (context.IsEmpty()) | 740 if (context.IsEmpty()) |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 972 if (!v8Call(v8::JSON::Parse(isolate, v8String(isolate, stringifiedJSON)), | 973 if (!v8Call(v8::JSON::Parse(isolate, v8String(isolate, stringifiedJSON)), |
| 973 parsed, tryCatch)) { | 974 parsed, tryCatch)) { |
| 974 if (tryCatch.HasCaught()) | 975 if (tryCatch.HasCaught()) |
| 975 exceptionState.rethrowV8Exception(tryCatch.Exception()); | 976 exceptionState.rethrowV8Exception(tryCatch.Exception()); |
| 976 } | 977 } |
| 977 | 978 |
| 978 return parsed; | 979 return parsed; |
| 979 } | 980 } |
| 980 | 981 |
| 981 } // namespace blink | 982 } // namespace blink |
| OLD | NEW |