Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(144)

Side by Side Diff: Source/core/workers/AbstractWorker.cpp

Issue 17236004: Update AbstractWorker, Worker and SharedWorker to match the spec (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 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 22 matching lines...) Expand all
33 #include "core/workers/AbstractWorker.h" 33 #include "core/workers/AbstractWorker.h"
34 34
35 #include "core/dom/EventNames.h" 35 #include "core/dom/EventNames.h"
36 #include "core/dom/ExceptionCode.h" 36 #include "core/dom/ExceptionCode.h"
37 #include "core/dom/ScriptExecutionContext.h" 37 #include "core/dom/ScriptExecutionContext.h"
38 #include "core/page/ContentSecurityPolicy.h" 38 #include "core/page/ContentSecurityPolicy.h"
39 #include "weborigin/SecurityOrigin.h" 39 #include "weborigin/SecurityOrigin.h"
40 40
41 namespace WebCore { 41 namespace WebCore {
42 42
43 AbstractWorker::AbstractWorker(ScriptExecutionContext* context) 43 AbstractWorker::AbstractWorker()
44 : ActiveDOMObject(context)
45 { 44 {
46 ScriptWrappable::init(this);
47 } 45 }
48 46
49 AbstractWorker::~AbstractWorker() 47 AbstractWorker::~AbstractWorker()
50 { 48 {
51 } 49 }
52 50
53 void AbstractWorker::contextDestroyed()
54 {
55 ActiveDOMObject::contextDestroyed();
56 }
57
58 KURL AbstractWorker::resolveURL(const String& url, ExceptionCode& ec) 51 KURL AbstractWorker::resolveURL(const String& url, ExceptionCode& ec)
59 { 52 {
60 if (url.isEmpty()) { 53 if (url.isEmpty()) {
61 ec = SYNTAX_ERR; 54 ec = SYNTAX_ERR;
62 return KURL(); 55 return KURL();
63 } 56 }
64 57
65 // FIXME: This should use the dynamic global scope (bug #27887) 58 // FIXME: This should use the dynamic global scope (bug #27887)
66 KURL scriptURL = scriptExecutionContext()->completeURL(url); 59 KURL scriptURL = scriptExecutionContext()->completeURL(url);
67 if (!scriptURL.isValid()) { 60 if (!scriptURL.isValid()) {
(...skipping 18 matching lines...) Expand all
86 { 79 {
87 return &m_eventTargetData; 80 return &m_eventTargetData;
88 } 81 }
89 82
90 EventTargetData* AbstractWorker::ensureEventTargetData() 83 EventTargetData* AbstractWorker::ensureEventTargetData()
91 { 84 {
92 return &m_eventTargetData; 85 return &m_eventTargetData;
93 } 86 }
94 87
95 } // namespace WebCore 88 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698