| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008, 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2008, 2009 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2009 Apple Inc. All rights reserved. | 3 * Copyright (C) 2009 Apple Inc. All rights reserved. |
| 4 * Copyright (C) 2014 Opera Software ASA. All rights reserved. | 4 * Copyright (C) 2014 Opera Software ASA. All rights reserved. |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions are | 7 * modification, are permitted provided that the following conditions are |
| 8 * met: | 8 * met: |
| 9 * | 9 * |
| 10 * * Redistributions of source code must retain the above copyright | 10 * * Redistributions of source code must retain the above copyright |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 #include "core/inspector/ConsoleMessage.h" | 61 #include "core/inspector/ConsoleMessage.h" |
| 62 #include "core/inspector/InspectorInstrumentation.h" | 62 #include "core/inspector/InspectorInstrumentation.h" |
| 63 #include "core/inspector/InspectorTraceEvents.h" | 63 #include "core/inspector/InspectorTraceEvents.h" |
| 64 #include "core/loader/DocumentLoader.h" | 64 #include "core/loader/DocumentLoader.h" |
| 65 #include "core/loader/FrameLoader.h" | 65 #include "core/loader/FrameLoader.h" |
| 66 #include "core/loader/FrameLoaderClient.h" | 66 #include "core/loader/FrameLoaderClient.h" |
| 67 #include "core/loader/NavigationScheduler.h" | 67 #include "core/loader/NavigationScheduler.h" |
| 68 #include "core/loader/ProgressTracker.h" | 68 #include "core/loader/ProgressTracker.h" |
| 69 #include "core/plugins/PluginView.h" | 69 #include "core/plugins/PluginView.h" |
| 70 #include "platform/Histogram.h" | 70 #include "platform/Histogram.h" |
| 71 #include "platform/NotImplemented.h" |
| 71 #include "platform/TraceEvent.h" | 72 #include "platform/TraceEvent.h" |
| 72 #include "platform/UserGestureIndicator.h" | 73 #include "platform/UserGestureIndicator.h" |
| 73 #include "platform/Widget.h" | 74 #include "platform/Widget.h" |
| 74 #include "platform/v8_inspector/public/V8StackTrace.h" | 75 #include "platform/v8_inspector/public/V8StackTrace.h" |
| 75 #include "platform/weborigin/SecurityOrigin.h" | 76 #include "platform/weborigin/SecurityOrigin.h" |
| 76 #include "public/platform/Platform.h" | 77 #include "public/platform/Platform.h" |
| 77 #include "wtf/CurrentTime.h" | 78 #include "wtf/CurrentTime.h" |
| 78 #include "wtf/StdLibExtras.h" | 79 #include "wtf/StdLibExtras.h" |
| 79 #include "wtf/StringExtras.h" | 80 #include "wtf/StringExtras.h" |
| 80 #include "wtf/text/CString.h" | 81 #include "wtf/text/CString.h" |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 for (size_t i = 0; i < extensions.size(); ++i) { | 337 for (size_t i = 0; i < extensions.size(); ++i) { |
| 337 if (extensions[i] == extension) | 338 if (extensions[i] == extension) |
| 338 return; | 339 return; |
| 339 } | 340 } |
| 340 v8::RegisterExtension(extension); | 341 v8::RegisterExtension(extension); |
| 341 registeredExtensions().append(extension); | 342 registeredExtensions().append(extension); |
| 342 } | 343 } |
| 343 | 344 |
| 344 static NPObject* createNoScriptObject() | 345 static NPObject* createNoScriptObject() |
| 345 { | 346 { |
| 346 NOTIMPLEMENTED(); | 347 notImplemented(); |
| 347 return nullptr; | 348 return 0; |
| 348 } | 349 } |
| 349 | 350 |
| 350 static NPObject* createScriptObject(LocalFrame* frame, v8::Isolate* isolate) | 351 static NPObject* createScriptObject(LocalFrame* frame, v8::Isolate* isolate) |
| 351 { | 352 { |
| 352 ScriptState* scriptState = ScriptState::forMainWorld(frame); | 353 ScriptState* scriptState = ScriptState::forMainWorld(frame); |
| 353 if (!scriptState) | 354 if (!scriptState) |
| 354 return createNoScriptObject(); | 355 return createNoScriptObject(); |
| 355 | 356 |
| 356 ScriptState::Scope scope(scriptState); | 357 ScriptState::Scope scope(scriptState); |
| 357 LocalDOMWindow* window = frame->localDOMWindow(); | 358 LocalDOMWindow* window = frame->localDOMWindow(); |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 600 for (size_t i = 0; i < resultArray->Length(); ++i) { | 601 for (size_t i = 0; i < resultArray->Length(); ++i) { |
| 601 v8::Local<v8::Value> value; | 602 v8::Local<v8::Value> value; |
| 602 if (!resultArray->Get(scriptState->context(), i).ToLocal(&value)) | 603 if (!resultArray->Get(scriptState->context(), i).ToLocal(&value)) |
| 603 return; | 604 return; |
| 604 results->append(value); | 605 results->append(value); |
| 605 } | 606 } |
| 606 } | 607 } |
| 607 } | 608 } |
| 608 | 609 |
| 609 } // namespace blink | 610 } // namespace blink |
| OLD | NEW |