111
119
bool JSLocation::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
113
if (customGetOwnPropertySlot(exec, propertyName, slot))
121
if (getOwnPropertySlotDelegate(exec, propertyName, slot))
115
123
return getStaticValueSlot<JSLocation, Base>(exec, &JSLocationTable, this, propertyName, slot);
118
JSValuePtr jsLocationHref(ExecState* exec, const Identifier&, const PropertySlot& slot)
120
Location* imp = static_cast<Location*>(static_cast<JSLocation*>(asObject(slot.slotBase()))->impl());
126
bool JSLocation::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
128
if (getOwnPropertyDescriptorDelegate(exec, propertyName, descriptor))
130
return getStaticValueDescriptor<JSLocation, Base>(exec, &JSLocationTable, this, propertyName, descriptor);
133
JSValue jsLocationHref(ExecState* exec, const Identifier&, const PropertySlot& slot)
135
JSLocation* castedThis = static_cast<JSLocation*>(asObject(slot.slotBase()));
137
Location* imp = static_cast<Location*>(castedThis->impl());
121
138
return jsString(exec, imp->href());
124
JSValuePtr jsLocationProtocol(ExecState* exec, const Identifier&, const PropertySlot& slot)
141
JSValue jsLocationProtocol(ExecState* exec, const Identifier&, const PropertySlot& slot)
126
Location* imp = static_cast<Location*>(static_cast<JSLocation*>(asObject(slot.slotBase()))->impl());
143
JSLocation* castedThis = static_cast<JSLocation*>(asObject(slot.slotBase()));
145
Location* imp = static_cast<Location*>(castedThis->impl());
127
146
return jsString(exec, imp->protocol());
130
JSValuePtr jsLocationHost(ExecState* exec, const Identifier&, const PropertySlot& slot)
149
JSValue jsLocationHost(ExecState* exec, const Identifier&, const PropertySlot& slot)
132
Location* imp = static_cast<Location*>(static_cast<JSLocation*>(asObject(slot.slotBase()))->impl());
151
JSLocation* castedThis = static_cast<JSLocation*>(asObject(slot.slotBase()));
153
Location* imp = static_cast<Location*>(castedThis->impl());
133
154
return jsString(exec, imp->host());
136
JSValuePtr jsLocationHostname(ExecState* exec, const Identifier&, const PropertySlot& slot)
157
JSValue jsLocationHostname(ExecState* exec, const Identifier&, const PropertySlot& slot)
138
Location* imp = static_cast<Location*>(static_cast<JSLocation*>(asObject(slot.slotBase()))->impl());
159
JSLocation* castedThis = static_cast<JSLocation*>(asObject(slot.slotBase()));
161
Location* imp = static_cast<Location*>(castedThis->impl());
139
162
return jsString(exec, imp->hostname());
142
JSValuePtr jsLocationPort(ExecState* exec, const Identifier&, const PropertySlot& slot)
165
JSValue jsLocationPort(ExecState* exec, const Identifier&, const PropertySlot& slot)
144
Location* imp = static_cast<Location*>(static_cast<JSLocation*>(asObject(slot.slotBase()))->impl());
167
JSLocation* castedThis = static_cast<JSLocation*>(asObject(slot.slotBase()));
169
Location* imp = static_cast<Location*>(castedThis->impl());
145
170
return jsString(exec, imp->port());
148
JSValuePtr jsLocationPathname(ExecState* exec, const Identifier&, const PropertySlot& slot)
173
JSValue jsLocationPathname(ExecState* exec, const Identifier&, const PropertySlot& slot)
150
Location* imp = static_cast<Location*>(static_cast<JSLocation*>(asObject(slot.slotBase()))->impl());
175
JSLocation* castedThis = static_cast<JSLocation*>(asObject(slot.slotBase()));
177
Location* imp = static_cast<Location*>(castedThis->impl());
151
178
return jsString(exec, imp->pathname());
154
JSValuePtr jsLocationSearch(ExecState* exec, const Identifier&, const PropertySlot& slot)
181
JSValue jsLocationSearch(ExecState* exec, const Identifier&, const PropertySlot& slot)
156
Location* imp = static_cast<Location*>(static_cast<JSLocation*>(asObject(slot.slotBase()))->impl());
183
JSLocation* castedThis = static_cast<JSLocation*>(asObject(slot.slotBase()));
185
Location* imp = static_cast<Location*>(castedThis->impl());
157
186
return jsString(exec, imp->search());
160
JSValuePtr jsLocationHash(ExecState* exec, const Identifier&, const PropertySlot& slot)
189
JSValue jsLocationHash(ExecState* exec, const Identifier&, const PropertySlot& slot)
162
Location* imp = static_cast<Location*>(static_cast<JSLocation*>(asObject(slot.slotBase()))->impl());
191
JSLocation* castedThis = static_cast<JSLocation*>(asObject(slot.slotBase()));
193
Location* imp = static_cast<Location*>(castedThis->impl());
163
194
return jsString(exec, imp->hash());
166
void JSLocation::put(ExecState* exec, const Identifier& propertyName, JSValuePtr value, PutPropertySlot& slot)
197
void JSLocation::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot)
168
if (customPut(exec, propertyName, value, slot))
199
if (putDelegate(exec, propertyName, value, slot))
170
201
lookupPut<JSLocation, Base>(exec, propertyName, value, &JSLocationTable, this, slot);
173
void setJSLocationHref(ExecState* exec, JSObject* thisObject, JSValuePtr value)
204
void setJSLocationHref(ExecState* exec, JSObject* thisObject, JSValue value)
175
206
static_cast<JSLocation*>(thisObject)->setHref(exec, value);
178
void setJSLocationProtocol(ExecState* exec, JSObject* thisObject, JSValuePtr value)
209
void setJSLocationProtocol(ExecState* exec, JSObject* thisObject, JSValue value)
180
211
static_cast<JSLocation*>(thisObject)->setProtocol(exec, value);
183
void setJSLocationHost(ExecState* exec, JSObject* thisObject, JSValuePtr value)
214
void setJSLocationHost(ExecState* exec, JSObject* thisObject, JSValue value)
185
216
static_cast<JSLocation*>(thisObject)->setHost(exec, value);
188
void setJSLocationHostname(ExecState* exec, JSObject* thisObject, JSValuePtr value)
219
void setJSLocationHostname(ExecState* exec, JSObject* thisObject, JSValue value)
190
221
static_cast<JSLocation*>(thisObject)->setHostname(exec, value);
193
void setJSLocationPort(ExecState* exec, JSObject* thisObject, JSValuePtr value)
224
void setJSLocationPort(ExecState* exec, JSObject* thisObject, JSValue value)
195
226
static_cast<JSLocation*>(thisObject)->setPort(exec, value);
198
void setJSLocationPathname(ExecState* exec, JSObject* thisObject, JSValuePtr value)
229
void setJSLocationPathname(ExecState* exec, JSObject* thisObject, JSValue value)
200
231
static_cast<JSLocation*>(thisObject)->setPathname(exec, value);
203
void setJSLocationSearch(ExecState* exec, JSObject* thisObject, JSValuePtr value)
234
void setJSLocationSearch(ExecState* exec, JSObject* thisObject, JSValue value)
205
236
static_cast<JSLocation*>(thisObject)->setSearch(exec, value);
208
void setJSLocationHash(ExecState* exec, JSObject* thisObject, JSValuePtr value)
239
void setJSLocationHash(ExecState* exec, JSObject* thisObject, JSValue value)
210
241
static_cast<JSLocation*>(thisObject)->setHash(exec, value);
213
void JSLocation::getPropertyNames(ExecState* exec, PropertyNameArray& propertyNames)
215
if (customGetPropertyNames(exec, propertyNames))
217
Base::getPropertyNames(exec, propertyNames);
220
JSValuePtr jsLocationPrototypeFunctionAssign(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
222
if (!thisValue->isObject(&JSLocation::s_info))
244
JSValue JSC_HOST_CALL jsLocationPrototypeFunctionAssign(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
247
if (!thisValue.inherits(&JSLocation::s_info))
223
248
return throwError(exec, TypeError);
224
249
JSLocation* castedThisObj = static_cast<JSLocation*>(asObject(thisValue));
225
250
return castedThisObj->assign(exec, args);
228
JSValuePtr jsLocationPrototypeFunctionReplace(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
253
JSValue JSC_HOST_CALL jsLocationPrototypeFunctionReplace(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
230
if (!thisValue->isObject(&JSLocation::s_info))
256
if (!thisValue.inherits(&JSLocation::s_info))
231
257
return throwError(exec, TypeError);
232
258
JSLocation* castedThisObj = static_cast<JSLocation*>(asObject(thisValue));
233
259
return castedThisObj->replace(exec, args);
236
JSValuePtr jsLocationPrototypeFunctionReload(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
262
JSValue JSC_HOST_CALL jsLocationPrototypeFunctionReload(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
238
if (!thisValue->isObject(&JSLocation::s_info))
265
if (!thisValue.inherits(&JSLocation::s_info))
239
266
return throwError(exec, TypeError);
240
267
JSLocation* castedThisObj = static_cast<JSLocation*>(asObject(thisValue));
241
268
return castedThisObj->reload(exec, args);
244
JSValuePtr jsLocationPrototypeFunctionToString(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
271
JSValue JSC_HOST_CALL jsLocationPrototypeFunctionToString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
246
if (!thisValue->isObject(&JSLocation::s_info))
274
if (!thisValue.inherits(&JSLocation::s_info))
247
275
return throwError(exec, TypeError);
248
276
JSLocation* castedThisObj = static_cast<JSLocation*>(asObject(thisValue));
249
277
return castedThisObj->toString(exec, args);
252
JSC::JSValuePtr toJS(JSC::ExecState* exec, Location* object)
280
JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, Location* object)
254
return getDOMObjectWrapper<JSLocation>(exec, object);
282
return getDOMObjectWrapper<JSLocation>(exec, globalObject, object);
256
Location* toLocation(JSC::JSValuePtr value)
284
Location* toLocation(JSC::JSValue value)
258
return value->isObject(&JSLocation::s_info) ? static_cast<JSLocation*>(asObject(value))->impl() : 0;
286
return value.inherits(&JSLocation::s_info) ? static_cast<JSLocation*>(asObject(value))->impl() : 0;